[Numpy-discussion] ImportError: No module named ma

Stéfan van der Walt stefan@sun.ac...
Tue Oct 7 14:32:44 CDT 2008

Hi John

2008/10/7 John Harrold <john.m.harrold@gmail.com>:
> I'm trying to run some scripts associated with a paper I was reading. They use
> the matplotlib to generate figures which in turn calles numpy. I'm new to
> python, but I'm very familiar with perl. I'm getting the following error, and
> I'm not quite sure what is causing it. Can anyone here offer any suggestions?
> jmh@dhcp068-156:$ python2.5  Bb-plot.py
> Traceback (most recent call last):
>  File "Bb-plot.py", line 7, in <module>
>    from pylab import *
>  File "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/pylab.py", line 1, in <module>
>    from matplotlib.pylab import *
>  File "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/matplotlib/__init__.py", line 128, in <module>
>    from rcsetup import defaultParams, validate_backend, validate_toolbar
>  File "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/matplotlib/rcsetup.py", line 19, in <module>
>    from matplotlib.colors import is_color_like
>  File "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/matplotlib/colors.py", line 39, in <module>
>    import matplotlib.cbook as cbook
>  File "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/matplotlib/cbook.py", line 9, in <module>
>    import numpy.ma as ma
> ImportError: No module named ma

Could you give us the version of NumPy that you are using?

>>> import numpy
>>> print numpy.__version__

As far as I recall, the masked array module was always available as
numpy.ma, but maybe I'm wrong.  Could you try the following:

>>> import numpy
>>> print numpy.core.ma


More information about the Numpy-discussion mailing list