Skip to content

Commit 44b4703

Browse files
authored
better unsupported indexing handling in lax_numpy.py
1 parent 3dbbfef commit 44b4703

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jax/_src/numpy/lax_numpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4875,8 +4875,8 @@ def _index_to_gather(x_shape: Sequence[int], idx: Sequence[Any],
48754875
"with type {} at position {}, indexer value {}")
48764876
raise TypeError(msg.format(abstract_i.dtype.name, idx_pos, i))
48774877

4878-
msg = "Indexing mode not yet supported. Open a feature request!\n{}"
4879-
raise IndexError(msg.format(idx))
4878+
raise IndexError("Indexing mode not yet supported. Got unsupported indexer "
4879+
f"at position {idx_pos}: {i!r}")
48804880

48814881
if len(gather_indices) == 0:
48824882
gather_indices_array: ArrayLike = np.zeros((0,), dtype=index_dtype)

0 commit comments

Comments
 (0)