class Pwc(operation, value_shape, durations, batch_shape)

A piecewise-constant tensor-valued function of time (or batch of such functions).

You can use the arithmetic operators +, -, *, **, /, //, and @ to perform operations between two Pwc objects or between a Pwc and a Tensor.

  • values (Tensor) – The values of the function on the piecewise-constant segments.

  • durations (np.ndarray) – The durations of the constant segments.

  • value_shape (tuple) – The shape of the function value.

  • batch_shape (tuple) – The shape of the batch in the function.

  • name (str) – The name assigned to the node.

See also


Operation to create piecewise-constant functions.


For more information on Pwc nodes see the Working with time-dependent functions in Boulder Opal topic.