Linear Algebra is a branch of mathematics that contains functions and equations useful in mathematical computations. Python’s scipy
library is used for mathematical and scientific calculations. It includes the module linalg
that contains linear algebra functions.
The coshm()
function returns the hyperbolic cosine of a matrix.
scipy.linalg.coshm(A)
This function takes the parameter, A
, which represents the input matrix.
This function returns another matrix containing the hyperbolic cosine of A
.
import numpy as npimport scipyfrom scipy.linalg import coshmA = np.matrix([[0.234,0.675],[3.456,0.987]])print(A)print('--------------------------')B = coshm(A)print(B)
numpy
and scipy
.linalg
module from scipy
.A
, and print it.A
, and store it in matrix B
.B
.