File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -550,13 +550,6 @@ def test_min_max_categorical(self):
550
550
assert ci .min () == "c"
551
551
assert ci .max () == "b"
552
552
553
- def test_numpy_any_all (self ):
554
- idx = Index ([0 , 1 , 2 ])
555
- assert not np .all (idx )
556
- assert np .any (idx )
557
- idx = Index ([1 , 2 , 3 ])
558
- assert np .all (idx )
559
-
560
553
561
554
class TestSeriesReductions :
562
555
# Note: the name TestSeriesReductions indicates these tests
@@ -905,6 +898,15 @@ def test_all_any(self):
905
898
s = Series (["abc" , True ])
906
899
assert "abc" == s .any () # 'abc' || True => 'abc'
907
900
901
+ @pytest .mark .parametrize ("klass" , [Index , Series ])
902
+ def test_numpy_all_any (self , klass ):
903
+ # GH#40180
904
+ idx = klass ([0 , 1 , 2 ])
905
+ assert not np .all (idx )
906
+ assert np .any (idx )
907
+ idx = Index ([1 , 2 , 3 ])
908
+ assert np .all (idx )
909
+
908
910
def test_all_any_params (self ):
909
911
# Check skipna, with implicit 'object' dtype.
910
912
s1 = Series ([np .nan , True ])
You can’t perform that action at this time.
0 commit comments