We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb2f999 commit 898b4d9Copy full SHA for 898b4d9
numexpr/tests/test_numexpr.py
@@ -963,7 +963,11 @@ def test_expressions(
963
# "overflows" or "divide by zero" in plain eval().
964
warnings.simplefilter("ignore")
965
try:
966
- npval = eval(expr, globals(), locals())
+ npexpr = expr
967
+ if "sign" in expr and dtype==complex and np.__version__<"2.0":
968
+ #definition of sign changed in numpy 2.0 for complex numbers
969
+ npexpr = expr.replace("sign(b+c)", "(b+c)/abs(b+c)")
970
+ npval = eval(npexpr, globals(), locals())
971
except Exception as ex:
972
np_exception = ex
973
npval = None
0 commit comments