@@ -4849,6 +4849,26 @@ def test_mask_or(self):
4849
4849
cntrl = np .array ([(1 , (1 , 1 )), (0 , (1 , 0 ))], dtype = dtype )
4850
4850
assert_equal (mask_or (amask , bmask ), cntrl )
4851
4851
4852
+ a = np .array ([False , False ])
4853
+ assert mask_or (a , a ) is nomask # gh-27360
4854
+
4855
+ def test_allequal (self ):
4856
+ x = array ([1 , 2 , 3 ], mask = [0 , 0 , 0 ])
4857
+ y = array ([1 , 2 , 3 ], mask = [1 , 0 , 0 ])
4858
+ z = array ([[1 , 2 , 3 ], [4 , 5 , 6 ]], mask = [[0 , 0 , 0 ], [1 , 1 , 1 ]])
4859
+
4860
+ assert allequal (x , y )
4861
+ assert not allequal (x , y , fill_value = False )
4862
+ assert allequal (x , z )
4863
+
4864
+ # test allequal for the same input, with mask=nomask, this test is for
4865
+ # the scenario raised in https://github.com/numpy/numpy/issues/27201
4866
+ assert allequal (x , x )
4867
+ assert allequal (x , x , fill_value = False )
4868
+
4869
+ assert allequal (y , y )
4870
+ assert not allequal (y , y , fill_value = False )
4871
+
4852
4872
def test_flatten_mask (self ):
4853
4873
# Tests flatten mask
4854
4874
# Standard dtype
0 commit comments