New to python; running windows. I am using python27, and ran the following code. It failed, even though it recognized numpy. Then, I made sure that numpy was installed by running pip install numpy. Reran the code and had the same problem: numpy
was recognized, and a list of classes in the auto-suggest populates, but not numpy.matrix
. I can't seem to find any indication that this should be a problem. It seems to just work...
import numpy
board = numpy.matrix([0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0])
It compiles, but the numpy.matrix
still has a red line under it. the popup message when I mouse over it says: undefined variable from import: matrix
How do I enable the matrix class? Or am I dealing with a Liclipse error? (Liclipse is my IDE)
Numpy is getting imported from:
module 'numpy' from 'C:\Python27\lib\site-packages\numpy\__init__.pyc'