forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.pyi
More file actions
57 lines (42 loc) · 1.4 KB
/
__init__.pyi
File metadata and controls
57 lines (42 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""Linear algebra functions"""
def cholesky(A):
"""
:param ~ulab.array A: a positive definite, symmetric square matrix
:return ~ulab.array L: a square root matrix in the lower triangular form
:raises ValueError: If the input does not fulfill the necessary conditions
The returned matrix satisfies the equation m=LL*"""
...
def det():
"""
:param: m, a square matrix
:return float: The determinant of the matrix
Computes the eigenvalues and eigenvectors of a square matrix"""
...
def dot(m1, m2):
"""
:param ~ulab.array m1: a matrix
:param ~ulab.array m2: a matrix
Computes the matrix product of two matrices
**WARNING:** Unlike ``numpy``, this function cannot be used to compute the dot product of two vectors"""
...
def eig(m):
"""
:param m: a square matrix
:return tuple (eigenvectors, eigenvalues):
Computes the eigenvalues and eigenvectors of a square matrix"""
...
def inv(m):
"""
:param ~ulab.array m: a square matrix
:return: The inverse of the matrix, if it exists
:raises ValueError: if the matrix is not invertible
Computes the inverse of a square matrix"""
...
def size(array):
"""Return the total number of elements in the array, as an integer."""
...
def trace(m):
"""
:param m: a square matrix
Compute the trace of the matrix, the sum of its diagonal elements."""
...