{"action":"created","issue":{"url":"https://api.github.com/repos/Blosc/bcolz/issues/195","labels_url":"https://api.github.com/repos/Blosc/bcolz/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/Blosc/bcolz/issues/195/comments","events_url":"https://api.github.com/repos/Blosc/bcolz/issues/195/events","html_url":"https://github.com/Blosc/bcolz/issues/195","id":77725087,"number":195,"title":"Implement logical operators for carray objects","user":{"login":"FrancescAlted","id":314521,"avatar_url":"https://avatars.githubusercontent.com/u/314521?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescAlted","html_url":"https://github.com/FrancescAlted","followers_url":"https://api.github.com/users/FrancescAlted/followers","following_url":"https://api.github.com/users/FrancescAlted/following{/other_user}","gists_url":"https://api.github.com/users/FrancescAlted/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescAlted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescAlted/subscriptions","organizations_url":"https://api.github.com/users/FrancescAlted/orgs","repos_url":"https://api.github.com/users/FrancescAlted/repos","events_url":"https://api.github.com/users/FrancescAlted/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescAlted/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T16:50:33Z","updated_at":"2015-05-18T17:50:32Z","closed_at":null,"body":"That would allow the next code to work correctly:\r\n\r\n```\r\nIn [1]: import bcolz\r\nIn [2]: a = bcolz.arange(1e7)\r\nIn [3]: b = bcolz.arange(1e7)\r\nIn [4]: a == b\r\nOut[4]: False\r\n```\r\n\r\nFor example, equality operator could easily (and efficiently) implemented as:\r\n\r\n```\r\nIn [5]: %time bcolz.eval(\"a != b\").sum() == 0\r\nCPU times: user 147 ms, sys: 32.8 ms, total: 180 ms\r\nWall time: 84.4 ms\r\nOut[67]: True\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Blosc/bcolz/issues/comments/103147481","html_url":"https://github.com/Blosc/bcolz/issues/195#issuecomment-103147481","issue_url":"https://api.github.com/repos/Blosc/bcolz/issues/195","id":103147481,"user":{"login":"FrancescAlted","id":314521,"avatar_url":"https://avatars.githubusercontent.com/u/314521?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescAlted","html_url":"https://github.com/FrancescAlted","followers_url":"https://api.github.com/users/FrancescAlted/followers","following_url":"https://api.github.com/users/FrancescAlted/following{/other_user}","gists_url":"https://api.github.com/users/FrancescAlted/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescAlted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescAlted/subscriptions","organizations_url":"https://api.github.com/users/FrancescAlted/orgs","repos_url":"https://api.github.com/users/FrancescAlted/repos","events_url":"https://api.github.com/users/FrancescAlted/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescAlted/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T17:50:32Z","updated_at":"2015-05-18T17:50:32Z","body":"Oh, on a second thought, I remember now that I deliberately left all the operators unimplemented for bcolz.  The reason is that once 'a == b' and 'a - b' would work, people would expect '(a - b) == c' to work too, and this is way out of the scope, and it is much preferable that people use bcolz.eval() for that (or dask, if the former is not enough).\r\n\r\nHowever, what we can do is to issue a 'NotImplementedError' on carray operations suggesting people to use .eval() for that.  Opinions?"}}