Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Gary Ruben <gruben@bi...>  20070131 14:10:20

I just picked up a problem posted over on the numpy list. I noticed that from pylab import * is importing the oldnumericwrapper versions of zeros(), ones() and empty(), and presumably other things too, into the interactive namespace. Shouldn't it be picking up the versions from numpy's main namespace for interactive use? I picked this up because I use "ipython pylab" and noticed that zeros() etc. was generating integers instead of floats by default. In ipython: Welcome to pylab, a matplotlibbased Python environment. For more information, type 'help(pylab)'. In [1]: zeros? Type: function Base Class: <type 'function'> String Form: <function zeros at 0x010CA3F0> Namespace: Interactive File: c:\python24\lib\sitepackages\numpy\oldnumeric\functions.py Definition: zeros(shape, typecode='l', savespace=0, dtype=None) Docstring: zeros(shape, dtype=int) returns an array of the given dimensions which is initialized to all zeros In [2]: import numpy as n In [3]: n.zeros? Type: builtin_function_or_method Base Class: <type 'builtin_function_or_method'> String Form: <builtin function zeros> Namespace: Interactive Docstring: zeros((d1,...,dn),dtype=float,order='C') Return a new array of shape (d1,...,dn) and type typecode with all it's entries initialized to zero.  Gary R. 