Skip to content

Commit 6a6719f

Browse files
committed
Add a TODO note for clip()
1 parent 31c5a89 commit 6a6719f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

array_api_strict/_elementwise_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def clip(
305305
# Note: NumPy applies type promotion, but the standard specifies the
306306
# return dtype should be the same as x
307307
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
308310
result = result.astype(x.dtype._np_dtype)
309311
return Array._new(result)
310312

0 commit comments

Comments
 (0)