|
17 | 17 | from hypothesis.strategies import booleans, composite, none, integers, shared
|
18 | 18 |
|
19 | 19 | from .array_helpers import (assert_exactly_equal, ndindex, asarray,
|
20 |
| - numeric_dtype_objects) |
| 20 | + numeric_dtype_objects, promote_dtypes) |
21 | 21 | from .hypothesis_helpers import (xps, dtypes, shapes, kwargs, matrix_shapes,
|
22 | 22 | square_matrix_shapes, symmetric_matrices,
|
23 | 23 | positive_definite_matrices, MAX_ARRAY_SIZE,
|
@@ -132,8 +132,7 @@ def test_cross(x1_x2_kw):
|
132 | 132 |
|
133 | 133 | res = linalg.cross(x1, x2, **kw)
|
134 | 134 |
|
135 |
| - # TODO: Replace result_type() with a helper function |
136 |
| - assert res.dtype == _array_module.result_type(x1, x2), "cross() did not return the correct dtype" |
| 135 | + assert res.dtype == promote_dtypes(x1, x2), "cross() did not return the correct dtype" |
137 | 136 | assert res.shape == shape, "cross() did not return the correct shape"
|
138 | 137 |
|
139 | 138 | # cross is too different from other functions to use _test_stacks, and it
|
@@ -269,8 +268,7 @@ def test_matmul(x1, x2):
|
269 | 268 | else:
|
270 | 269 | res = linalg.matmul(x1, x2)
|
271 | 270 |
|
272 |
| - # TODO: Replace result_type() with a helper function |
273 |
| - assert res.dtype == _array_module.result_type(x1, x2), "matmul() did not return the correct dtype" |
| 271 | + assert res.dtype == promote_dtypes(x1, x2), "matmul() did not return the correct dtype" |
274 | 272 |
|
275 | 273 | if len(x1.shape) == len(x2.shape) == 1:
|
276 | 274 | assert res.shape == ()
|
|
0 commit comments