@@ -409,7 +409,7 @@ def func(l: Array, r: Union[Scalar, Array]) -> Array:
409
409
410
410
def func (l : Array , r : Union [Scalar , Array ]) -> Array :
411
411
locals_ = {}
412
- locals_ [left_sym ] = ah .asarray (l , copy = True ) # prevents mutating l
412
+ locals_ [left_sym ] = xp .asarray (l , copy = True ) # prevents mutating l
413
413
locals_ [right_sym ] = r
414
414
exec (expr , locals_ )
415
415
return locals_ [left_sym ]
@@ -659,7 +659,7 @@ def test_bitwise_left_shift(ctx, data):
659
659
if ctx .right_is_scalar :
660
660
assume (right >= 0 )
661
661
else :
662
- assume (not ah .any (ah .isnegative (right )))
662
+ assume (not xp .any (ah .isnegative (right )))
663
663
664
664
res = ctx .func (left , right )
665
665
@@ -718,7 +718,7 @@ def test_bitwise_right_shift(ctx, data):
718
718
if ctx .right_is_scalar :
719
719
assume (right >= 0 )
720
720
else :
721
- assume (not ah .any (ah .isnegative (right )))
721
+ assume (not xp .any (ah .isnegative (right )))
722
722
723
723
res = ctx .func (left , right )
724
724
@@ -851,13 +851,13 @@ def test_floor(x):
851
851
@given (data = st .data ())
852
852
def test_floor_divide (ctx , data ):
853
853
left = data .draw (
854
- ctx .left_strat .filter (lambda x : not ah .any (x == 0 )), label = ctx .left_sym
854
+ ctx .left_strat .filter (lambda x : not xp .any (x == 0 )), label = ctx .left_sym
855
855
)
856
856
right = data .draw (ctx .right_strat , label = ctx .right_sym )
857
857
if ctx .right_is_scalar :
858
858
assume (right != 0 )
859
859
else :
860
- assume (not ah .any (right == 0 ))
860
+ assume (not xp .any (right == 0 ))
861
861
862
862
res = ctx .func (left , right )
863
863
@@ -908,7 +908,7 @@ def test_greater_equal(ctx, data):
908
908
909
909
@given (xps .arrays (dtype = xps .numeric_dtypes (), shape = hh .shapes ()))
910
910
def test_isfinite (x ):
911
- out = ah .isfinite (x )
911
+ out = xp .isfinite (x )
912
912
ph .assert_dtype ("isfinite" , x .dtype , out .dtype , xp .bool )
913
913
ph .assert_shape ("isfinite" , out .shape , x .shape )
914
914
unary_assert_against_refimpl ("isfinite" , x , out , math .isfinite , res_stype = bool )
@@ -924,7 +924,7 @@ def test_isinf(x):
924
924
925
925
@given (xps .arrays (dtype = xps .numeric_dtypes (), shape = hh .shapes ()))
926
926
def test_isnan (x ):
927
- out = ah .isnan (x )
927
+ out = xp .isnan (x )
928
928
ph .assert_dtype ("isnan" , x .dtype , out .dtype , xp .bool )
929
929
ph .assert_shape ("isnan" , out .shape , x .shape )
930
930
unary_assert_against_refimpl ("isnan" , x , out , math .isnan , res_stype = bool )
@@ -1024,7 +1024,7 @@ def test_logaddexp(x1, x2):
1024
1024
1025
1025
@given (* hh .two_mutual_arrays ([xp .bool ]))
1026
1026
def test_logical_and (x1 , x2 ):
1027
- out = ah .logical_and (x1 , x2 )
1027
+ out = xp .logical_and (x1 , x2 )
1028
1028
ph .assert_dtype ("logical_and" , [x1 .dtype , x2 .dtype ], out .dtype )
1029
1029
ph .assert_result_shape ("logical_and" , [x1 .shape , x2 .shape ], out .shape )
1030
1030
binary_assert_against_refimpl (
@@ -1034,7 +1034,7 @@ def test_logical_and(x1, x2):
1034
1034
1035
1035
@given (xps .arrays (dtype = xp .bool , shape = hh .shapes ()))
1036
1036
def test_logical_not (x ):
1037
- out = ah .logical_not (x )
1037
+ out = xp .logical_not (x )
1038
1038
ph .assert_dtype ("logical_not" , x .dtype , out .dtype )
1039
1039
ph .assert_shape ("logical_not" , out .shape , x .shape )
1040
1040
unary_assert_against_refimpl (
@@ -1044,7 +1044,7 @@ def test_logical_not(x):
1044
1044
1045
1045
@given (* hh .two_mutual_arrays ([xp .bool ]))
1046
1046
def test_logical_or (x1 , x2 ):
1047
- out = ah .logical_or (x1 , x2 )
1047
+ out = xp .logical_or (x1 , x2 )
1048
1048
ph .assert_dtype ("logical_or" , [x1 .dtype , x2 .dtype ], out .dtype )
1049
1049
ph .assert_result_shape ("logical_or" , [x1 .shape , x2 .shape ], out .shape )
1050
1050
binary_assert_against_refimpl (
@@ -1157,7 +1157,7 @@ def test_remainder(ctx, data):
1157
1157
if ctx .right_is_scalar :
1158
1158
assume (right != 0 )
1159
1159
else :
1160
- assume (not ah .any (right == 0 ))
1160
+ assume (not xp .any (right == 0 ))
1161
1161
1162
1162
res = ctx .func (left , right )
1163
1163
0 commit comments