Skip to content
Open
Changes from 1 commit
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: 3 additions & 1 deletion keras/src/backend/tensorflow/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,9 @@ def searchsorted(sorted_sequence, values, side="left"):
f"sorted_sequence.shape={sorted_sequence.shape}"
)
out_type = (
"int32" if len(sorted_sequence) <= np.iinfo(np.int32).max else "int64"
"int32"
if (sorted_sequence).shape[0] <= np.iinfo(np.int32).max
else "int64"
)
return tf.searchsorted(
sorted_sequence, values, side=side, out_type=out_type
Expand Down
Loading