Hello SciPy-Dev community, Regarding the Tentative NumPy Tutorial (Array Creation) <http://wiki.scipy.org/Tentative_NumPy_Tutorial#head-d3f8e5fe9b903f3c3b2a5c0d...>, I have noticed that there might have been a potential typo in one of the code snippet. i.e. I believe... ``` np.ones( (2,3,4), dtype = int16) ``` should be corrected to: ``` np.ones( (2,3,4), dtype = "int16") ``` (Note the double quotes around the int16. Here is my console log to illustrate this: ``` np.ones( (2,3,4), dtype = int16) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-10-6606a1d2e14b> in <module>() ----> 1 np.ones( (2,3,4), dtype = int16) NameError: name 'int16' is not defined np.ones( (2,3,4), dtype = "int16") Out[11]: array([[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]], dtype=int16) ``` If this makes sense please could we correct the tutorial documentation? Thanks! Johnny
Johnny Chan <johnnychan0302@gmail.com> wrote:
I believe...
``` np.ones( (2,3,4), dtype = int16) ```
should be corrected to:
``` np.ones( (2,3,4), dtype = "int16")
If this makes sense please could we correct the tutorial documentation?
It should be np.ones( (2,3,4), dtype = np.int16) Sturla
participants (2)
-
Johnny Chan -
Sturla Molden