Hi Eric, I don't think this is a bug. Your last import doesnt do what you think it is doing. For example:
In [1]: import matplotlib as d In [2]: from d import rcParams --------------------------------------------------------------------------- exceptions.ImportError Traceback (most recent call last) /home/darren/<ipython console> ImportError: No module named d You have imported the module to namespace d, you have not renamed the module. If you want median and std in the main namespace, you could do median = num.median std = num.std that is, you could this if median and std were provided by numerix, which they are not. They are in matplotlib.numerix.mlab. Darren On Tuesday 10 October 2006 08:48, Eric Emsellem wrote: > Hi, > > I have a problem when importing numpy from matplotlib.numerix: > > When I do: > > import matplotlib > import matplotlib.numerix as num # numpy > from num import median, std > > I get: > exceptions.ImportError Traceback (most > recent call last) > ImportError: No module named num > > It seems that it does not import numpy but something else. (for example > num.std does not exist). > How do I solve that? (I saw a thread which seems to indicate that it was > solved recently, but I have recent versions of everything : > matplotlib version 0.87.5 > platform is linux2 > numerix numpy 1.0rc1.dev3157 > backend GTKAgg version 2.8.2 > Python 2.4.2 (#1, May 2 2006, 08:13:46) > IPython 0.7.3.svn -- An enhanced Interactive Python. > > What could I do there? > > Note that in the help of matplotlib.numerix, numpy is only indicated in > Option 0. (see below) > > thanks for any help there. > > Eric > ================================================== > when I do: > > help num > > ==> I get: > > Help on package matplotlib.numerix in matplotlib: > > NAME > matplotlib.numerix - numerix imports either Numeric or numarray > based on various selectors. > > FILE > /usr/local/lib/python2.4/site/packages/matplotlib/numerix/__init__.py > > DESCRIPTION > 0. If the value "--numpy","--numarray" or "--Numeric" is specified > on the > command line, then numerix imports the specified > array package. > > 1. The value of numerix in matplotlibrc: either Numeric or numarray > > 2. If none of the above is done, the default array package is Numeric. > Because the matplotlibrc always provides *some* value for numerix > (it has it's own system of default values), this default is most > likely never used. > > To summarize: the commandline is examined first, the rc file second, > and the default array package is Numeric. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Darren S. Dale, Ph.D. Staff Scientist Cornell High Energy Synchrotron Source Cornell University 275 Wilson Lab Rt. 366 & Pine Tree Road Ithaca, NY 14853 [EMAIL PROTECTED] office: (607) 255-3819 fax: (607) 255-9001 http://www.chess.cornell.edu ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users