[SciPy-user] changing the default data type of zeros and ones

Gael Varoquaux gael.varoquaux@normalesup....
Thu Oct 11 10:37:40 CDT 2007


On Thu, Oct 11, 2007 at 10:34:54AM -0500, Ryan Krauss wrote:
> Sorry, this is a pylab/numpy incompatibility problem.  In order to not
> spend a lot of time talking about namespaces and such, I teach them to
> put

> from scipy import *
> from pylab import *

> at the beginning of every script and from there it will kind of feel
> like Matlab.  It is pylab.zeros and pylab.ones that is the problem.

> How do I best explain this to my students?

Reverse the order of the scipy and pylab import. With all due respect to
the MPL guys who have done a fantastic job of making things simple, I'd
much rather have scipy functions overridding pylab's than the opposite.

Gaël


More information about the SciPy-user mailing list