Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions array_api_strict/_elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ def clip(
isinstance(arg, Array) and arg.dtype in _real_floating_dtypes)):
raise TypeError(f"{argname} must be integral when x is integral")
if (x.dtype in _real_floating_dtypes
and (isinstance(arg, int) or
isinstance(arg, Array) and arg.dtype in _integer_dtypes)):
and (isinstance(arg, Array) and arg.dtype in _integer_dtypes)
):
raise TypeError(f"{arg} must be floating-point when x is floating-point")

# Normalize to make the below logic simpler
Expand Down
Loading