Tensor.__setitem__¶
- Tensor.__setitem__(indices, values)[source]¶
Implement
self[indices] = values.This method should be overridden by subclasses.
- Parameters:
- indicesindex expression
Integer, slice or sequence of these, defining the positions of the data array which should be written to.
- valuesscalar,
array-likeorTensor The value(s) that are to be assigned.
If
indexis an integer,valuemust be a scalar.If
indexis a slice or a sequence of slices,valuemust be broadcastable to the shape of the slice.