Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
__init__.py96 linesDownload Raw Back to linalg
1"""
2``numpy.linalg``
3================
4
5The NumPy linear algebra functions rely on BLAS and LAPACK to provide efficient
6low level implementations of standard linear algebra algorithms. Those
7libraries may be provided by NumPy itself using C versions of a subset of their
8reference implementations but, when possible, highly optimized libraries that
9take advantage of specialized processor functionality are preferred. Examples
10of such libraries are OpenBLAS, MKL (TM), and ATLAS. Because those libraries
11are multithreaded and processor dependent, environmental variables and external
12packages such as threadpoolctl may be needed to control the number of threads
13or specify the processor architecture.
14
15- OpenBLAS: https://www.openblas.net/
16- threadpoolctl: https://github.com/joblib/threadpoolctl
17
18Please note that the most-used linear algebra functions in NumPy are present in
19the main ``numpy`` namespace rather than in ``numpy.linalg``.  There are:
20``dot``, ``vdot``, ``inner``, ``outer``, ``matmul``, ``tensordot``, ``einsum``,
21``einsum_path`` and ``kron``.
22
23Functions present in numpy.linalg are listed below.
24
25
26Matrix and vector products
27--------------------------
28
29   cross
30   multi_dot
31   matrix_power
32   tensordot
33   matmul
34
35Decompositions
36--------------
37
38   cholesky
39   outer
40   qr
41   svd
42   svdvals
43
44Matrix eigenvalues
45------------------
46
47   eig
48   eigh
49   eigvals
50   eigvalsh
51
52Norms and other numbers
53-----------------------
54
55   norm
56   matrix_norm
57   vector_norm
58   cond
59   det
60   matrix_rank
61   slogdet
62   trace (Array API compatible)
63
64Solving equations and inverting matrices
65----------------------------------------
66
67   solve
68   tensorsolve
69   lstsq
70   inv
71   pinv
72   tensorinv
73
74Other matrix operations
75-----------------------
76
77   diagonal (Array API compatible)
78   matrix_transpose (Array API compatible)
79
80Exceptions
81----------
82
83   LinAlgError
84
85"""
86# To get sub-modules
87from . import _linalg
88from ._linalg import *
89
90__all__ = _linalg.__all__.copy()  # noqa: PLE0605
91
92from numpy._pytesttester import PytestTester
93
94test = PytestTester(__name__)
95del PytestTester
96 
codekingpro/portable-devtools · Team Ai