{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/1080","repository_url":"https://api.github.com/repos/Theano/Theano","labels_url":"https://api.github.com/repos/Theano/Theano/issues/1080/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/1080/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/1080/events","html_url":"https://github.com/Theano/Theano/issues/1080","id":8454697,"number":1080,"title":"Make TensorVariable interface more similar to that of numpy.ndarray","user":{"login":"abalkin","id":535197,"avatar_url":"https://avatars.githubusercontent.com/u/535197?v=3","gravatar_id":"","url":"https://api.github.com/users/abalkin","html_url":"https://github.com/abalkin","followers_url":"https://api.github.com/users/abalkin/followers","following_url":"https://api.github.com/users/abalkin/following{/other_user}","gists_url":"https://api.github.com/users/abalkin/gists{/gist_id}","starred_url":"https://api.github.com/users/abalkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abalkin/subscriptions","organizations_url":"https://api.github.com/users/abalkin/orgs","repos_url":"https://api.github.com/users/abalkin/repos","events_url":"https://api.github.com/users/abalkin/events{/privacy}","received_events_url":"https://api.github.com/users/abalkin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Theano/Theano/labels/Easy%20fix","name":"Easy fix","color":"ededed"},{"url":"https://api.github.com/repos/Theano/Theano/labels/Interface","name":"Interface","color":"0052cc"},{"url":"https://api.github.com/repos/Theano/Theano/labels/Python%20Code%20Only","name":"Python Code Only","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2012-11-18T22:15:25Z","updated_at":"2016-03-22T22:22:16Z","closed_at":null,"body":"See also gh-1216\r\n\r\nNumpy's ndarray instances support many convenience methods most of which are already implemented as global functions in theano.tensor but not available as TensorVariable members.\r\n\r\nHere is the summary:\r\n\r\n```\r\n +-----------------+-----------------------------+--------------------------------+\r\n | ndarray         | Theano                      | Status                         |\r\n +-----------------+-----------------------------+--------------------------------+\r\n | x.argmax()      | T.argmax(x)                 | DONE\r\n | x.argmin()      | T.argmin(x)                 | DONE\r\n | x.argsort()     | T.sort.argsort(x)           | DONE\r\n | x.choose()      |  ---                        | T.switch(x) is numpy.where(x)\r\n | x.clip()        | T.clip(x)                   | DONE\r\n | x.compress()    | ---                         |\r\n | x.conj()        | T.conj(x)                   | DONE\r\n | x.cumprod()     | T.cumprod(x)                | DONE w/o dtype=\r\n | x.cumsum()      | T.cumsum(x)                 | DONE w/o dtype=\r\n | x.diagonal()    | T.diagonal                  | DONE\r\n | x.dot(y)        | T.dot(x,y) or x.__dot__(y)  | DONE\r\n | x.fill(sval))   | T.fill(x, sval)             | DONE\r\n | x.imag          | T.imag(x)                   | DONE\r\n | x.nonzero()     | T.nonzero(x)                | DONE\r\n | x.ptp()         | T.ptp(x, axi)               | DONE\r\n | x.put()         | ---                         | DONE\r\n | x.ravel()       | T.flatten()                 | DONE w/o order=\r\n | x.real          | T.real(x)                   | DONE\r\n | x.repeat()      | T.repeat(x)                 | DONE\r\n | x.round()       | T.round(x)                  | DONE w/o decimals=\r\n | x.searchsorted()| ---                         |\r\n | x.sort()        | T.sort(x)                   | DONE\r\n | x.squeeze()     | T.squeeze(x)                | DONE\r\n | x.swapaxes()    | T.swapaxes(x)                        | DONE\r\n | x.std()         | T.std(x)                    | DONE\r\n | x.take(i)       | T.take(x, i)                | DONE\r\n | x.trace()       | SB.linalg.trace(x)          | DONE\r\n +-----------------+-----------------------------+--------------------------------+\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/200059241","html_url":"https://github.com/Theano/Theano/issues/1080#issuecomment-200059241","issue_url":"https://api.github.com/repos/Theano/Theano/issues/1080","id":200059241,"user":{"login":"MarcCote","id":660004,"avatar_url":"https://avatars.githubusercontent.com/u/660004?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcCote","html_url":"https://github.com/MarcCote","followers_url":"https://api.github.com/users/MarcCote/followers","following_url":"https://api.github.com/users/MarcCote/following{/other_user}","gists_url":"https://api.github.com/users/MarcCote/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcCote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcCote/subscriptions","organizations_url":"https://api.github.com/users/MarcCote/orgs","repos_url":"https://api.github.com/users/MarcCote/repos","events_url":"https://api.github.com/users/MarcCote/events{/privacy}","received_events_url":"https://api.github.com/users/MarcCote/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T22:22:16Z","updated_at":"2016-03-22T22:22:16Z","body":"`T.searchsorted` doesn't seem to exist. I just remembered I had started it a while back. This might help:\r\nhttps://github.com/MarcCote/Theano/blob/searchsorted/theano/tensor/extra_ops.py#L11"}}