scipy.linalg.
tanm#
- scipy.linalg.tanm(A)[Quelle]#
Berechne den Matrix-Tangens.
Diese Routine verwendet expm, um die Matrix-Exponentiale zu berechnen.
Die Dokumentation wurde unter der Annahme verfasst, dass die Array-Argumente bestimmte „Kern“-Formen haben. Array-Argumente dieser Funktion können jedoch zusätzliche „Batch“-Dimensionen vorangestellt haben. In diesem Fall wird das Array als Stapel von niedrigdimensionalen Schnitten behandelt; siehe Gestapelte lineare Operationen für Details.
- Parameter:
- A(N, N) array_like
Eingabearray.
- Rückgabe:
- tanm(N, N) ndarray
Matrix-Tangens von A
Beispiele
>>> import numpy as np >>> from scipy.linalg import tanm, sinm, cosm >>> a = np.array([[1.0, 3.0], [1.0, 4.0]]) >>> t = tanm(a) >>> t array([[ -2.00876993, -8.41880636], [ -2.80626879, -10.42757629]])
Überprüfen Sie tanm(a) = sinm(a).dot(inv(cosm(a)))
>>> s = sinm(a) >>> c = cosm(a) >>> s.dot(np.linalg.inv(c)) array([[ -2.00876993, -8.41880636], [ -2.80626879, -10.42757629]])