@@ -112,6 +112,7 @@ def cross_args(draw, dtype_objects=dh.numeric_dtypes):
112
112
kw = draw (kwargs (axis = integers (- size , size - 1 )))
113
113
axis = kw .get ('axis' , - 1 )
114
114
shape [axis ] = 3
115
+ shape = tuple (shape )
115
116
116
117
mutual_dtypes = shared (mutually_promotable_dtypes (dtypes = dtype_objects ))
117
118
arrays1 = xps .arrays (
@@ -139,7 +140,7 @@ def test_cross(x1_x2_kw):
139
140
140
141
res = linalg .cross (x1 , x2 , ** kw )
141
142
142
- assert res .dtype == dh .promotion_table [ x1 , x2 ] , "cross() did not return the correct dtype"
143
+ assert res .dtype == dh .result_type ( x1 . dtype , x2 . dtype ) , "cross() did not return the correct dtype"
143
144
assert res .shape == shape , "cross() did not return the correct shape"
144
145
145
146
# cross is too different from other functions to use _test_stacks, and it
@@ -365,7 +366,7 @@ def test_outer(x1, x2):
365
366
366
367
shape = (x1 .shape [0 ], x2 .shape [0 ])
367
368
assert res .shape == shape , "outer() did not return the correct shape"
368
- assert res .dtype == dh .promotion_table [ x1 , x2 ] , "outer() did not return the correct dtype"
369
+ assert res .dtype == dh .result_type ( x1 . dtype , x2 . dtype ) , "outer() did not return the correct dtype"
369
370
370
371
if 0 in shape :
371
372
true_res = _array_module .empty (shape , dtype = res .dtype )
0 commit comments