數據分析基礎之Linalg的使用

Linear algebra

 

簡介

When SciPy is built using the optimized ATLAS LAPACK and BLAS libraries, it has very fast linear algebra capabilities.html

If you dig deep enough, all of the raw lapack and blas libraries are available for your use for even more speed.數組

All of these linear algebra routines expect an object that can be converted into a 2-dimensional array. The output of these routines is also a two-dimensional array.函數

 

1.模塊文檔

View Code
View Code

 

2.可用方法

'bench','cholesky','cond','det','division','eig','array','eigh','eigvals','eigvalsh','info','inv','lapack_lite','linalg','lstsq','matrix_power','matrix_rank','multi_dot','norm','pinv','print_function','qr','slogdet','solve','svd','tensorinv','tensorsolve','test'ui

eig : eigenvalues and right eigenvectors of general arrays
eigvalsh : eigenvalues of symmetric or Hermitian arrays.
eigh : eigenvalues and eigenvectors of symmetric/Hermitian arrays.spa

 

3.經常使用方法

首先導入相關模塊3d

import numpy as np
from scipy import linalg as LA #or #from numpy import linalg as LA

 

3.1求數組的行列式:detcode

 

3.2求方陣的特徵值、特徵向量:eigorm

 

 

3.3求方陣的逆矩陣::invhtm

 

 

3.4求解線性方程組:solveblog

Solve the system of equations x0 x1 9 and x0 x1 8:

 

 

3.5一個方陣的整數次冪:matrix_power

 

 

 

3.6計算在一個函數調用兩個或兩個以上的陣列的點積:multi_dot

 

4.官網文檔

https://docs.scipy.org/doc/numpy/reference/routines.linalg.html

相關文章
相關標籤/搜索