I just picked up a problem posted over on the numpy list. I noticed that
from pylab import * is importing the oldnumeric-wrapper 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 matplotlib-based 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\site-packages\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:    <built-in 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.

-------------------------------------------------------------------------
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

Reply via email to