Hi Belinda, On 12/29/06, belinda thom <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using matplotlib w/numerix set to numpy (as described in my prior > post). > > What I am wondering is in what situations one would want to: > > import pylab > import numpy > > together, because there is matlab-style stuff (e.g. matrices, arrays, > cumprod, fft, arange etc.) by importing the pylab package alone.
To add to Eric's detailed reply, keep in mind that much of this duplication is a historical accident. John Hunter developed mpl (and hence pylab) back in the Dark Days of the Split (aka, when we lived with Numeric and Numarray, both lacking critical functionality). At that time he needed various pieces of numerical functionality for his own work, so the most logical thing to do was to put it in the package he had control over: matplotlib. In fact, the same thing happened in three places: if you look at the python landscape for these tools around 2003/4, you'll find that ipython, scipy and matplotlib ALL had tools for: interactive work, plotting and numerics. Over time, as each package has matured, we've all tried to move away from this, so that hopefully the responsibilities will be: - ipython -> interactive work - numpy/scipy -> numerics - matploblib -> plotting While little code has been removed yet (to avoid breaking compatibility for existing users), at least most of what mattered has been moved to where it makes sense: numpy inherited utilities from ipython and pylab, ipython has absorbed the interactive support for matplotlib and I don't develop its plotting tools anymore (they were for gnuplot), etc. Following these ideas, in my personal use I normally do: import numpy as N import scipy as S import pylab as P and I try to use P.plottingStuff(), N.arrayStuff() and S.scipyOnlyThings(). I think this is an approach that better matches the real intent of these tools for the long term. I hope this is useful. best, f ------------------------------------------------------------------------- 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