cupynumeric.linalg.expm#

cupynumeric.linalg.expm(
a: ndarray,
method: str = 'pade',
) ndarray#

Matrix exponential.

Returns exp(A) for each (M x M) slice into a multi-dimensional array, assumed to be of shape (…, M, M);

By default Pade (implicit) implementation is used. However, explicit Taylor(deg = 18) implementation can be used, by supplying additional flag use_explicit = True.

Parameters:
  • a ((..., M, M) array_like) – Input matrix or multi-dimensional array of shape (…, M, M).

  • method (String method selector to use explicit ('taylor')) – or implicit (‘pade’); default = ‘pade’.

Returns:

exp(A) – for each slice in the input.

Return type:

matrix exponential of input, or a matrix exponential

Notes

Implicit Pade implementation is more stable but more computationally intensive than explicit Taylor, which is less stable when matrix norm is big enough. Also, Taylor can be slightly more performant for matrices of small enough norms, but more memory consuming.

See also

scipy.linalg.expm

Availability:

Multiple GPUs, Multiple CPUs