We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ac7511 + f2efce5 commit 349fd46Copy full SHA for 349fd46
array_api_strict/_elementwise_functions.py
@@ -278,8 +278,8 @@ def clip(
278
isinstance(arg, Array) and arg.dtype in _real_floating_dtypes)):
279
raise TypeError(f"{argname} must be integral when x is integral")
280
if (x.dtype in _real_floating_dtypes
281
- and (isinstance(arg, int) or
282
- isinstance(arg, Array) and arg.dtype in _integer_dtypes)):
+ and (isinstance(arg, Array) and arg.dtype in _integer_dtypes)
+ ):
283
raise TypeError(f"{arg} must be floating-point when x is floating-point")
284
285
# Normalize to make the below logic simpler
0 commit comments