diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/user/quickstart.rst | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst index ab5bb5318..77569f6bb 100644 --- a/doc/source/user/quickstart.rst +++ b/doc/source/user/quickstart.rst @@ -1394,53 +1394,7 @@ See :ref:`structured_arrays`. Linear Algebra ============== -Work in progress. Basic linear algebra to be included here. - -Simple Array Operations ------------------------ - -See linalg.py in numpy folder for more. - -:: - - >>> import numpy as np - >>> a = np.array([[1.0, 2.0], [3.0, 4.0]]) - >>> print(a) - [[1. 2.] - [3. 4.]] - >>> a.transpose() - array([[1., 3.], - [2., 4.]]) - >>> np.linalg.inv(a) - array([[-2. , 1. ], - [ 1.5, -0.5]]) - >>> u = np.eye(2) # unit 2x2 matrix; "eye" represents "I" - >>> u - array([[1., 0.], - [0., 1.]]) - >>> j = np.array([[0.0, -1.0], [1.0, 0.0]]) - >>> j @ j # matrix product - array([[-1., 0.], - [ 0., -1.]]) - >>> np.trace(u) # trace - 2.0 - >>> y = np.array([[5.], [7.]]) - >>> np.linalg.solve(a, y) - array([[-3.], - [ 4.]]) - >>> np.linalg.eig(j) - (array([0.+1.j, 0.-1.j]), array([[0.70710678+0.j , 0.70710678-0.j ], - [0. -0.70710678j, 0. +0.70710678j]])) - -:: - - Parameters: - square matrix - Returns - The eigenvalues, each repeated according to its multiplicity. - The normalized (unit "length") eigenvectors, such that the - column ``v[:, i]`` is the eigenvector corresponding to the - eigenvalue ``w[i]`` . +See :doc:`tutorial-svd` Tricks and Tips =============== |