You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complex numbers can be ordered, and Numpy uses the lexicographic order. It's true that no ordering exists that satisfies similar relations vs. both addition and multiplication as for reals. But I don't think the present behavior is really incorrect. One an argue that it is inconsistent both with Python, though, and I suspect there's not that much code that correctly makes use of this.
There was some discussion previously and we were seriously considering deprecating it in gh-15981, and not long ago Rakesh started working on that in gh-17030.
That said, it is hard to say what fallout might crop up which may lead us to keep the current behaviour. And it indeed is not a bug as such.
I am going to close this in favor of the linked issue, @nschloe if you want to discuss this further, I would suggest commenting either on the issue or PR.
Since there is no ordering in the complex numbers, vanilla Python correctly rejects something like
with
Numpy incorrectly does something -- no idea what though. In any case, the following should probably fail:
The text was updated successfully, but these errors were encountered: