2.2.1.4. sdepy.process.shapeas¶
-
process.
shapeas
(vshape_or_process)[source]¶ Reshape process values according to the given target shape.
Returns a process pointing to the same data as the calling process, adding new 1-dimensional axes, or removing existing 1-dimensional axes to the left of the first dimension of process values, as needed to make the returned process broadcastable to a process with values of the given shape.
To achieve broadcastability the unaffected dimensions, including the shape of the timeline and the number of paths, have to be compatible.
Raises: - ValueError : if requested to remove a non 1-dimensional axis