Skip to content
Open
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
2 changes: 1 addition & 1 deletion distrax/_src/distributions/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def to_batch_shape_index(
A new index that is only applied on the batch shape.
"""
try:
new_index = [x[index] for x in np.indices(batch_shape)]
new_index = [x[index] for x in jnp.indices(batch_shape)]
return tuple(new_index)
except IndexError as e:
raise IndexError(f'Batch shape `{batch_shape}` not compatible with index '
Expand Down