Skip to content

Commit c51d6cc

Browse files
committed
Use ndarays_to_tensors() for normalising setitem value
1 parent ba66944 commit c51d6cc

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
@@ -398,7 +398,7 @@ def __getitem__(self, index):
398398
def __setitem__(self, index, value):
399399
index = _helpers.ndarrays_to_tensors(index)
400400
index = ndarray._upcast_int_indices(index)
401-
value = asarray(value).get()
401+
value = _helpers.ndarrays_to_tensors(value)
402402
return self._tensor.__setitem__(index, value)
403403

404404
### sorting ###

0 commit comments

Comments
 (0)