diff --git a/numpy/lib/tests/test_nanfunctions.py b/numpy/lib/tests/test_nanfunctions.py index 64464edccfc0..7cdcff32dc80 100644 --- a/numpy/lib/tests/test_nanfunctions.py +++ b/numpy/lib/tests/test_nanfunctions.py @@ -818,6 +818,7 @@ def test_keepdims(self): (-3, -1), ] ) + @pytest.mark.filterwarnings("ignore:All-NaN slice:RuntimeWarning") def test_keepdims_out(self, axis): d = np.ones((3, 5, 7, 11)) # Randomly set some elements to NaN: @@ -1021,6 +1022,7 @@ def test_keepdims(self): (-3, -1), ] ) + @pytest.mark.filterwarnings("ignore:All-NaN slice:RuntimeWarning") def test_keepdims_out(self, q, axis): d = np.ones((3, 5, 7, 11)) # Randomly set some elements to NaN: