@@ -223,7 +223,7 @@ def test_bitwise_and(args):
223
223
x = int (x1 )
224
224
y = int (x2 )
225
225
res = int (a )
226
- ans = int_to_dtype (x & y , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
226
+ ans = int_to_dtype (x & y , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
227
227
assert ans == res
228
228
229
229
@given (two_integer_dtypes .flatmap (lambda i : two_array_scalars (* i )))
@@ -240,12 +240,12 @@ def test_bitwise_left_shift(args):
240
240
raise RuntimeError ("Error: test_bitwise_left_shift needs to be updated for nonscalar array inputs" )
241
241
x = int (x1 )
242
242
y = int (x2 )
243
- if y >= dtype_nbits ( a .dtype ) :
243
+ if y >= dtype_nbits [ a .dtype ] :
244
244
# Avoid shifting very large y in Python ints
245
245
ans = 0
246
246
else :
247
247
ans = x << y
248
- ans = int_to_dtype (ans , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
248
+ ans = int_to_dtype (ans , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
249
249
res = int (a )
250
250
assert ans == res
251
251
@@ -263,7 +263,7 @@ def test_bitwise_invert(x):
263
263
else :
264
264
x = int (x )
265
265
res = int (a )
266
- ans = int_to_dtype (~ x , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
266
+ ans = int_to_dtype (~ x , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
267
267
assert ans == res
268
268
269
269
@given (two_integer_or_boolean_dtypes .flatmap (lambda i : two_array_scalars (* i )))
@@ -284,7 +284,7 @@ def test_bitwise_or(args):
284
284
x = int (x1 )
285
285
y = int (x2 )
286
286
res = int (a )
287
- ans = int_to_dtype (x | y , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
287
+ ans = int_to_dtype (x | y , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
288
288
assert ans == res
289
289
290
290
@given (two_integer_dtypes .flatmap (lambda i : two_array_scalars (* i )))
@@ -301,7 +301,7 @@ def test_bitwise_right_shift(args):
301
301
raise RuntimeError ("Error: test_bitwise_right_shift needs to be updated for nonscalar array inputs" )
302
302
x = int (x1 )
303
303
y = int (x2 )
304
- ans = int_to_dtype (x >> y , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
304
+ ans = int_to_dtype (x >> y , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
305
305
res = int (a )
306
306
assert ans == res
307
307
@@ -323,7 +323,7 @@ def test_bitwise_xor(args):
323
323
x = int (x1 )
324
324
y = int (x2 )
325
325
res = int (a )
326
- ans = int_to_dtype (x ^ y , dtype_nbits ( a .dtype ) , dtype_signed ( a .dtype ) )
326
+ ans = int_to_dtype (x ^ y , dtype_nbits [ a .dtype ] , dtype_signed [ a .dtype ] )
327
327
assert ans == res
328
328
329
329
@given (numeric_scalars )
0 commit comments