Open FrancescAlted opened 9 years ago
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).
However, what we can do is to issue a 'NotImplementedError' on carray operations suggesting people to use .eval() for that. Opinions?
I think implementing ==
and !=
might be ok. Not sure though. Can you explain why (a - b) == c
is out of scope.
Also, raising NotImplementedError
would be better than just silently defaulting to False
.
Also, how would ==
work for carrays that have the same data, but different rootdirs
?
That would allow the next code to work correctly:
For example, equality operator could easily (and efficiently) implemented as: