@@ -1486,7 +1486,7 @@ def test_simple(self, xp: ModuleType, library: Backend):
14861486 pytest .xfail ("NumPy <1.24 has no kind kwarg in isin" )
14871487
14881488 b = xp .asarray ([1 , 2 , 3 , 4 ])
1489-
1489+
14901490 # `a` with 1 dimension
14911491 a = xp .asarray ([1 , 3 , 6 , 10 ])
14921492 expected = xp .asarray ([True , True , False , False ])
@@ -1499,20 +1499,31 @@ def test_simple(self, xp: ModuleType, library: Backend):
14991499 res = isin (a , b )
15001500 xp_assert_equal (res , expected )
15011501
1502- def test_device (self , xp : ModuleType , device : Device ):
1502+ def test_device (self , xp : ModuleType , device : Device , library : Backend ):
1503+ if library .like (Backend .NUMPY ) and NUMPY_VERSION < (1 , 24 ):
1504+ pytest .xfail ("NumPy <1.24 has no kind kwarg in isin" )
1505+
15031506 a = xp .asarray ([1 , 3 , 6 ], device = device )
15041507 b = xp .asarray ([1 , 2 , 3 ], device = device )
15051508 assert get_device (isin (a , b )) == device
15061509
1507- def test_assume_unique_and_invert (self , xp : ModuleType , device : Device ):
1510+ def test_assume_unique_and_invert (
1511+ self , xp : ModuleType , device : Device , library : Backend
1512+ ):
1513+ if library .like (Backend .NUMPY ) and NUMPY_VERSION < (1 , 24 ):
1514+ pytest .xfail ("NumPy <1.24 has no kind kwarg in isin" )
1515+
15081516 a = xp .asarray ([0 , 3 , 6 , 10 ], device = device )
15091517 b = xp .asarray ([1 , 2 , 3 , 10 ], device = device )
15101518 expected = xp .asarray ([True , False , True , False ])
15111519 res = isin (a , b , assume_unique = True , invert = True )
15121520 assert get_device (res ) == device
15131521 xp_assert_equal (res , expected )
1514-
1515- def test_kind (self , xp : ModuleType ):
1522+
1523+ def test_kind (self , xp : ModuleType , library : Backend ):
1524+ if library .like (Backend .NUMPY ) and NUMPY_VERSION < (1 , 24 ):
1525+ pytest .xfail ("NumPy <1.24 has no kind kwarg in isin" )
1526+
15161527 a = xp .asarray ([0 , 3 , 6 , 10 ])
15171528 b = xp .asarray ([1 , 2 , 3 , 10 ])
15181529 expected = xp .asarray ([False , True , False , True ])
0 commit comments