Skip to content

Commit 704f725

Browse files
committed
fix (JAX backend)(general.py): adding a check to the implementation of set_item to handle the case where the query is an empty list or tuple.
1 parent da1d258 commit 704f725

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ivy/functional/backends/jax/general.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def set_item(
109109
*,
110110
copy: Optional[bool] = False,
111111
) -> JaxArray:
112+
113+
if query == [] or query == ():
114+
return x
112115
if ivy.is_array(query) and ivy.is_bool_dtype(query):
113116
query = _mask_to_index(query, x)
114117
expected_shape = x[query].shape

0 commit comments

Comments
 (0)