1

When using PyDev to edit code using NumPy, I have found the following problem:

PyDev recognizes that the numpy library exists, so it does not mark its import statement as an error. What it does mark as an error is calling any function in the module.

The interesting bit, though, is that if instead of doing

import numpy as np

i do

import numpy.__init__ as np

then everything works fine, it does not mark functions as errors and the autocomplete feature works correctly.

So, it seems that although it finds the library in the path, for some reason it does not try to import __init__.py by default.

Any ideas?

4

0 回答 0