DiscretizedSpaceElement.__setitem__¶
-
DiscretizedSpaceElement.
__setitem__
(self, indices, values)[source]¶ Set values of this element.
- Parameters
- indicesint or
slice
The position(s) that should be set
- valuesscalar or
array-like
Value(s) to be assigned. If
indices
is an integer,values
must be a scalar value. Ifindices
is a slice,values
must be broadcastable to the size of the slice (same size, shape(1,)
or scalar). Forindices == slice(None)
, i.e. in the callvec[:] = values
, a multi-dimensional array of correct shape is allowed asvalues
.
- indicesint or