diff options
author | Dieter Werthmüller <prisae@users.noreply.github.com> | 2018-12-12 11:59:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 11:59:19 -0600 |
commit | f7f8c52bddf076a458b9243c78ff9763a17f7005 (patch) | |
tree | e8356a3747859eb2539c34f919f62b0b07370c0e | |
parent | b40321f0668673c0519ce0e124427cb8d0cc3135 (diff) | |
download | numpy-f7f8c52bddf076a458b9243c78ff9763a17f7005.tar.gz |
DOC: Change 'num' to 'np'
Stumbled upon this *NumPy for Matlab users* guide. Even though it says *Note: this is just an example, not a statement of "best practices"* I think it would still be better to use `np` instead of `num`, as this is the most common abbreviation you'll find in examples etc.
Just close the PR if you disagree.
-rw-r--r-- | doc/source/user/numpy-for-matlab-users.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/source/user/numpy-for-matlab-users.rst b/doc/source/user/numpy-for-matlab-users.rst index 399237c21..45e40d011 100644 --- a/doc/source/user/numpy-for-matlab-users.rst +++ b/doc/source/user/numpy-for-matlab-users.rst @@ -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 |