-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] test_numpy_array_protocol
test failures with numpy 2.0.0rc1
#41319
Labels
Milestone
Comments
Same for openSUSE. |
Patch to make it work with the numpy 2 release candidate: Index: arrow-apache-arrow-16.0.0/python/pyarrow/tests/test_array.py
===================================================================
--- arrow-apache-arrow-16.0.0.orig/python/pyarrow/tests/test_array.py
+++ arrow-apache-arrow-16.0.0/python/pyarrow/tests/test_array.py
@@ -3323,7 +3323,7 @@ def test_numpy_array_protocol():
result = np.asarray(arr)
np.testing.assert_array_equal(result, expected)
- if Version(np.__version__) < Version("2.0"):
+ if Version(np.__version__) < Version("2.0.0rc1"):
# copy keyword is not strict and not passed down to __array__
result = np.array(arr, copy=False)
np.testing.assert_array_equal(result, expected)
Index: arrow-apache-arrow-16.0.0/python/pyarrow/tests/test_table.py
===================================================================
--- arrow-apache-arrow-16.0.0.orig/python/pyarrow/tests/test_table.py
+++ arrow-apache-arrow-16.0.0/python/pyarrow/tests/test_table.py
@@ -3244,7 +3244,7 @@ def test_numpy_array_protocol(constructo
table = constructor([[1, 2, 3], [4.0, 5.0, 6.0]], names=["a", "b"])
expected = np.array([[1, 4], [2, 5], [3, 6]], dtype="float64")
- if Version(np.__version__) < Version("2.0"):
+ if Version(np.__version__) < Version("2.0.0rc1"):
# copy keyword is not strict and not passed down to __array__
result = np.array(table, copy=False)
np.testing.assert_array_equal(result, expected) |
jorisvandenbossche
added a commit
that referenced
this issue
Jun 13, 2024
### Rationale for this change The tests are failing on windows when using numpy 2.0 RC, probably related to default integer bitwidth. ### What changes are included in this PR? ### Are these changes tested? ### Are there any user-facing changes? * GitHub issue: #41319 * GitHub Issue: #41924 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Resolved by #42099 |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
When running pyarrow 16.0.0 test suite against numpy 2.0.0rc1 on Gentoo Linux amd64, I'm seeing the following test failures:
(in addition to the health check failure that I've reported in #41318)
Full build + test log: dev-python:pyarrow-16.0.0:20240421-124023.log.gz
Component(s)
Python
The text was updated successfully, but these errors were encountered: