This may be a simple question, but I am stuck: I want to use numpy with Python 2.6. I appended the path where the numpy folder is located:
C:\Python26\lib\site-packages\
and also the path for the numpy folder itself
C:\Python26\lib\site-packages\numpy
However, this error message appears
x=np.array([[7,8,5][3,5,7]],np.int32)
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
x=np.array([[7,8,5][3,5,7]],np.int32)
NameError: name 'np' is not defined
Could you help me with this?
You shouldn’t have to add those things to the path. Python knows where to look for installed modules as long as you have C:\Python26 in the path.
Sven Marnach was asking if you did it like this:
Edit: I just noticed you left out a comma in your array declaration also…fixed it in the above