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

TST: fix testability against numpy 2.0 dev (handle numpy 1.25 deprecations) #443

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions unyt/tests/test_array_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
# This is not necessarilly complete !
NOOP_FUNCTIONS = {
np.all, # expects booleans
np.alltrue, # expects booleans
np.amax, # works out of the box (tested)
np.amin, # works out of the box (tested)
np.angle, # expects complex numbers
Expand Down Expand Up @@ -71,7 +70,6 @@
np.repeat, # works out of the box (tested)
np.tile, # works out of the box (tested)
np.shares_memory, # works out of the box (tested)
np.sometrue, # works out of the box (tested)
np.nonzero, # works out of the box (tested)
np.count_nonzero, # returns pure numbers
np.flatnonzero, # works out of the box (tested)
Expand Down Expand Up @@ -119,7 +117,6 @@
np.unravel_index, # returns pure numbers
np.fix, # works out of the box (tested)
np.round, # is implemented via np.around
np.round_, # is implemented via np.around
np.may_share_memory, # returns pure numbers (booleans)
np.linalg.matrix_power, # works out of the box (tested)
np.linalg.cholesky, # works out of the box (tested)
Expand Down Expand Up @@ -177,8 +174,12 @@
"rank", # deprecated in numpy 1.10, removed in 1.18
"rate", # deprecated in numpy 1.18, removed in 1.20
"msort", # deprecated in numpy 1.24
"product", # deprecated in numpy 1.25
"cumproduct", # deprecated in numpy 1.25
# numpy 1.25 deprecations
"product",
"cumproduct",
"round_", # removed in 2.0
"sometrue",
"alltrue",
}

NOT_HANDLED_FUNCTIONS = NOOP_FUNCTIONS | UNSUPPORTED_FUNCTIONS | IGNORED_FUNCTIONS
Expand Down