{ } Raw JSON

bundles / scipy latest / scipy / linalg / _matfuncs / sinm

function

scipy.linalg._matfuncs:sinm

source: /scipy/linalg/_matfuncs.py :606

Signature

def   sinm ( A )

Summary

Compute the matrix sine.

Extended Summary

This routine uses expm to compute the matrix exponentials.

The documentation is written assuming array arguments are of specified "core" shapes. However, array argument(s) of this function may have additional "batch" dimensions prepended to the core shape. In this case, the array is treated as a batch of lower-dimensional slices; see linalg_batch for details. Note that calls with zero-size batches are unsupported and will raise a ValueError.

Parameters

A : (N, N) array_like

Input array.

Returns

sinm : (N, N) ndarray

Matrix sine of A

Examples

import numpy as np
from scipy.linalg import expm, sinm, cosm
Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta)) applied to a matrix:
a = np.array([[1.0, 2.0], [-1.0, 3.0]])
expm(1j*a)
cosm(a) + 1j*sinm(a)

Aliases

  • scipy.linalg.sinm