-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't set the promotion state explicitly.
The method `_set_promotion_state` was removed in numpy 2.2 and the promotion state is set to weak by default: https://numpy.org/devdocs/release/2.2.0-notes.html#nep-50-promotion-state-option-removed PiperOrigin-RevId: 714013325
- Loading branch information
1 parent
69e993c
commit 6a357aa
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/python/test/unit/language/test_core.py | ||
+++ b/python/test/unit/language/test_core.py | ||
@@ -363,8 +363,7 @@ def _test_binary(dtype_x, dtype_y, expr, | ||
# We remove any explicit casting | ||
pattern = r'\.astype\(np\.\w+\)' | ||
scalar_expr = expr if numpy_expr is None else re.sub(pattern, '', numpy_expr) | ||
- with promotion_numpy_2_0(): | ||
- z_ref = eval(scalar_expr) | ||
+ z_ref = eval(scalar_expr) | ||
else: | ||
z_ref = eval(expr if numpy_expr is None else numpy_expr) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters