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. If indices is a slice, values must be broadcastable to the size of the slice (same size, shape (1,) or scalar). For indices == slice(None), i.e. in the call vec[:] = values, a multi-dimensional array of correct shape is allowed as values.