jonathanbsyd
jonathanbsyd

Reputation: 8451

State of the pylab import?

There is a proposal to unify, simplify and build consistency within the scipy, numpy and matplotlib namespaces so that:

from pylab import *

is equivilent to:

from scipy import *
from numpy import *
from pylab import * (although I personally think it should be from matplotlib)

It's been over 3 years since http://www.scipy.org/PyLab was first written (refer to mailling list discussion linked from that proposal http://matplotlib.1069221.n5.nabble.com/Pylab-import-error-due-to-dateutil-td39346.html)

Is there an update on progress on this or has it stalled? This question is really calling out to someone who has been following the dev mailling lists of the relevant packages numpy, scipy, matplotlib, ipython etc

[EDIT]

There is more to this than just polluting the toplevel namespace. It is about unifying the API of the four aforementioned packages and streamlining the process for scientific programming. Personally in my work, I find that if I need numpy, I always need matplotlib and I often require something from scipy.

Upvotes: 2

Views: 457

Answers (1)

pelson
pelson

Reputation: 21839

It doesn't look like it has been discussed since 2009 (although the wiki page was updated a couple of months ago). I agree with the sentiment of one of the posts in the mpl mailing list:

>>> import this
The Zen of Python, by Tim Peters
...
Namespaces are one honking great idea -- let's do more of those!

I can see the benefit of having a consistent documentation strategy between the projects, but having one monolithic namespace I am less than convinced on...

In terms of implementation, the matplotlib pylab namespace is still around on master today (and therefore will be part of the upcoming 1.2 release), so there is certainly no short term plan for this to be taken forward. I would consider getting in touch with the author of the page you are referring to to see what their plans are.

HTH

Upvotes: 2

Related Questions