new_shape += (-3,)
elif isinstance(index, Symbol):
if new_shape != ():
new_shape += (-4,)
sliced = _npi.slice(result, begin, end, step)
result = _npi.reshape(sliced, new_shape)
if not is_symbol_tuple:
is_symbol_tuple = True
else:
raise IndexError("Only integer, slice, symbol or tuple of these types"
After Change
return _npi.advanced_indexing(self, key)
elif isinstance(key, tuple) and len(key) == 0:
return self
elif isinstance(key, tuple) and all(isinstance(k, Symbol) for k in key):
key = _npi.stack(*[i for i in key])
sliced = _npi.advanced_indexing_multiple(self, key)
return sliced