Skip to content

Commit 9641b2c

Browse files
committed
Use correct helper in __setitem__()
1 parent 08a370e commit 9641b2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_np/_ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def __getitem__(self, index):
425425
return ndarray._from_tensor_and_base(self._tensor.__getitem__(index), self)
426426

427427
def __setitem__(self, index, value):
428-
index = _helpers.to_tensors(index)
428+
index = _helpers.ndarrays_to_tensors(index)
429429
index = ndarray._upcast_int_indices(index)
430430
value = asarray(value).get()
431431
return self._tensor.__setitem__(index, value)

0 commit comments

Comments
 (0)