diff options
Diffstat (limited to 'numpy/_array_api/_searching_functions.py')
-rw-r--r-- | numpy/_array_api/_searching_functions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/_array_api/_searching_functions.py b/numpy/_array_api/_searching_functions.py index 4764992a1..d80720850 100644 --- a/numpy/_array_api/_searching_functions.py +++ b/numpy/_array_api/_searching_functions.py @@ -1,6 +1,7 @@ from __future__ import annotations from ._array_object import Array +from ._dtypes import _result_type from typing import Optional, Tuple @@ -38,4 +39,6 @@ def where(condition: Array, x1: Array, x2: Array, /) -> Array: See its docstring for more information. """ + # Call result type here just to raise on disallowed type combinations + _result_type(x1.dtype, x2.dtype) return Array._new(np.where(condition._array, x1._array, x2._array)) |