Theano/Theano — pull request #1139 by jlowin (2012-12-16 21:33:22+00:00)
Title: Add sort method and tensor.argsort function

As discussed on the mailing list: https://groups.google.com/forum/?fromgroups=#!topic/theano-dev/B9DNiC15Jtc

The implementation of sort and argsort is inconsistent -- sort is a function (called as theano.tensor.sort) but not a method; argsort is a method (called as matrix().argsort) but not a function. If Theano is to follow NumPy's example, both sort and argsort should be callable as either a function or a method.

Part of the confusion is that the docstring for matrix().argsort says to refer to theano.tensor.sort.argsort, but because the function "sort" is imported in the theano.tensor namespace from the "theano.tensor.sort" module, the module is shadowed and argsort is unavailable.