DiscretizedSpaceElement.__setitem__¶
- DiscretizedSpaceElement.__setitem__(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
indicesis an integer,valuesmust be a scalar value. Ifindicesis a slice,valuesmust 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