We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31c5a89 commit 6a6719fCopy full SHA for 6a6719f
array_api_strict/_elementwise_functions.py
@@ -305,6 +305,8 @@ def clip(
305
# Note: NumPy applies type promotion, but the standard specifies the
306
# return dtype should be the same as x
307
if result.dtype != x.dtype._np_dtype:
308
+ # TODO: I'm not completely sure this always gives the correct thing
309
+ # for integer dtypes. See https://github.com/numpy/numpy/issues/24976
310
result = result.astype(x.dtype._np_dtype)
311
return Array._new(result)
312
0 commit comments