diff options
Diffstat (limited to 'doc/source/user/numpy-for-matlab-users.rst')
| -rw-r--r-- | doc/source/user/numpy-for-matlab-users.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/source/user/numpy-for-matlab-users.rst b/doc/source/user/numpy-for-matlab-users.rst index 399237c21..16ee48c5e 100644 --- a/doc/source/user/numpy-for-matlab-users.rst +++ b/doc/source/user/numpy-for-matlab-users.rst @@ -547,7 +547,7 @@ Linear Algebra Equivalents - eigenvalues and eigenvectors of ``a`` * - ``[V,D]=eig(a,b)`` - - ``V,D = np.linalg.eig(a,b)`` + - ``D,V = scipy.linalg.eig(a,b)`` - eigenvalues and eigenvectors of ``a``, ``b`` * - ``[V,D]=eigs(a,k)`` @@ -693,19 +693,19 @@ this is just an example, not a statement of "best practices"): :: - # Make all numpy available via shorter 'num' prefix - import numpy as num + # Make all numpy available via shorter 'np' prefix + import numpy as np # Make all matlib functions accessible at the top level via M.func() import numpy.matlib as M # Make some matlib functions accessible directly at the top level via, e.g. rand(3,3) from numpy.matlib import rand,zeros,ones,empty,eye # Define a Hermitian function def hermitian(A, **kwargs): - return num.transpose(A,**kwargs).conj() + return np.transpose(A,**kwargs).conj() # Make some shortcuts for transpose,hermitian: - # num.transpose(A) --> T(A) + # np.transpose(A) --> T(A) # hermitian(A) --> H(A) - T = num.transpose + T = np.transpose H = hermitian Links |
