forked from mindspore-Ecosystem/mindspore
Fix infinite loop while tensor augassign using '...' as index
This commit is contained in:
parent
958c2a8e00
commit
6685ed95ea
|
@ -252,8 +252,9 @@ class Tensor(Tensor_):
|
|||
|
||||
def __getitem__(self, index):
|
||||
out = tensor_operator_registry.get('__getitem__')(self, index)
|
||||
out.parent_tensor_ = self
|
||||
out.index_of_parent_ = index
|
||||
if out is not self:
|
||||
out.parent_tensor_ = self
|
||||
out.index_of_parent_ = index
|
||||
return out
|
||||
|
||||
def __setitem__(self, index, value):
|
||||
|
|
Loading…
Reference in New Issue