ninetoothed.Tensor.eval#

Tensor.eval(subs=None)#

Evaluate the symbolic tensor into a numeric tensor.

Parameters:
  • tensor – The symbolic tensor.

  • subs – The substitutions for symbolic variables.

Returns:

A numeric tensor as a numpy.ndarray.

Changed in version 0.22.0: The dimensions of the outermost level are preserved. Previously, the evaluation would flatten the dimensions of the outermost level.