Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] array equality defaults to identity #18117

Closed
asfimport opened this issue Feb 13, 2018 · 7 comments
Closed

[Python] array equality defaults to identity #18117

asfimport opened this issue Feb 13, 2018 · 7 comments

Comments

@asfimport
Copy link

I'm not sure this is deliberate, but it doesn't look very desirable to me:

>>> pa.array([1,2,3], type=pa.int32()) == pa.array([1,2,3], type=pa.int32())
False

Reporter: Antoine Pitrou / @pitrou
Assignee: Wes McKinney / @wesm

PRs and other links:

Note: This issue was originally created as ARROW-2150. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Uwe Korn / @xhochy:
No, this at the moment only lack of implementation. We have function in C++ that actually can take care of the comparisons (they are as simple as calling Array::Equal()) but they are probably not yet invoked in Python.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
So the intended behaviour is to return a bool value, not an array of bools as with Numpy arrays?

@asfimport
Copy link
Author

Wes McKinney / @wesm:
I think we should make this raise for now, and later perform vector comparison like NumPy (once we have a kernel available to do this)

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
A more general question: what is the ultimate aim for the Array API? Do we want to reproduce the Numpy API, or just provide a thin storage layer?

@asfimport
Copy link
Author

Wes McKinney / @wesm:
For the time being, I believe it should be a thin storage layer, and that the user API for analytics and computations should evolve separately.

Once we have a more sizable collection of kernel functions to work with we should spend some time thinking about what the API should look like.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:

For the time being, I believe it should be a thin storage layer, and that the user API for analytics and computations should evolve separately.

Such as letting the user create a Dask array from pyarrow buffers?

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 1729
#1729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants