Ignore numpy's warning on an invalid value
@@ -129,6 +129,7 @@ class TestZmap:
def test_zmap_nan_policy_propagate(self, xp, scp, dtype):
x = xp.array([4.0, 1.0, 1.0, xp.nan], dtype=dtype)
y = xp.array([xp.nan, -4.0, -1.0, -5.0], dtype=dtype)
+ with numpy.errstate(invalid='ignore'): # numpy warns with complex
return scp.stats.zmap(x, y, nan_policy='propagate')
@testing.for_dtypes('fdFD')
@@ -212,6 +213,7 @@ class TestZscore:
@testing.numpy_cupy_allclose(scipy_name='scp')
def test_zscore_nan_policy_propagate(self, xp, scp, dtype):
x = xp.array([4.0, 1.0, 1.0, xp.nan], dtype=dtype)
+ with numpy.errstate(invalid='ignore'): # numpy warns with complex
return scp.stats.zscore(x, nan_policy='propagate')
@testing.for_dtypes('fdFD')
