On Fri, Jun 12, 2009 at 11:21 AM, Matthias Michler<matthiasmich...@gmx.net> wrote: > Hi Sebastian, > > You are right. A large number of numpy functions is part of pylab, but I think > this problem was solved by introducing matplotlib.pyplot, which holds all > plotting functions of matplotlib. The module pylab imports these plotting > functions and all the numpy-stuff in order to offer plotting + numerical > functions by one import. > > kind regards Matthias > Matthias, thanks for the info. thats the info I was missing. >>> from matplotlib import pyplot >>> len(pyplot.__dict__) 191
Now I'm somewhat wondering about the things in pylab that are not in pyplot nor in numpy. E.g.: pyplot.log2 is not numpy.log2 or pyplot.window_hanning vs. numpy.hanning or pyplot.chisquare (which however is in numpy.random) In summary, could one say that some functions are "left" in pylab to keep backwards- and/or Matlab- compatibility ? But does window_hanning behave exactly like numpy.hanning ? I remember that some functions where decidedly implemented differently than in numpy -- (sqrt for sqrt(-1) => 1j -- or was this scipy vs. numpy) Cheers, Sebastian > On Friday 12 June 2009 10:49:52 Sebastian Haase wrote: >> Hi, >> long time ago there was a discussion on reducing the duplications of >> functions / symbols between Numpy and Matplotlib. >> >> I think from this resulted the pylab module now having many fewer entries: >> >>> import matplotlib >> >>> matplotlib.__version__ >> >> '0.98.5.2' >> >> >>> import pylab >> >>> len(pylab.__dict__) >> >> 882 >> >> However, I think these are still to many ! I wrote, already before >> the cleanup, a "HACK"-cleanup routine, which makes a cut-down modules >> (called P) like this: >> # P = new.module("pylab_sparse","""pylab module minus stuff alreay in >> numpy""") for k,v in pylab.__dict__.iteritems(): >> try: >> if k[:2] == '__' or v is numpy.__dict__[k]: >> continue >> except KeyError: >> pass >> #P.__dict__[k] = v >> exec("%s = pylab.%s" % (k,k)) >> >> ((the commented out lines did not work, but they might still >> illustrate what I want to do -- now I have this code in a separate >> module that I can import as "P" >> >> This way I get: >> >>> len(P.__dict__) >> >> 395 >> >> >>> numpy.__version__ >> >> '1.3.0' >> >> >> So why are there still that many -- more than half ! -- duplications >> between pylab and numpy ? >> >> Regards, >> >> Sebastian Haase ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users