|
From: Bill B. <wb...@gm...> - 2006-02-13 15:58:48
|
Ah, ok. You're right. Doing from pylab import * was actually just overwriting the definition of array and rand() to be those from Numeric, which pylab was picking to use by default. I guess my expectation was tha= t pylab would default to using the best numerical package installed. With "numerix : numpy" in my ~/.matplotlib/matplotlibrc file, it seems to b= e working properly now. Thanks for the help! --bb On 2/14/06, John Hunter <jdh...@ac...> wrote: > > >>>>> "Bill" =3D=3D Bill Baxter <wb...@gm...> writes: > > Bill> from numpy import * was the only line missing, called before > Bill> the rest. It seems to work fine if I use from pylab import > Bill> * instead of import pylab as g > > Bill> And actually if I do both in this order: import pylab as g > Bill> from pylab import * > > Bill> Seems as if there's some > Bill> initialization code that only gets run with the 'from pylab > Bill> import *' version. > > As far as I know that is a python impossibility, unless perhaps you do > some deep dark magic that is beyond my grasp. pylab doesn't know how > it is imported. > > Are you sure you have your numerix set properly? I suggest creating > two free standing scripts, one with the problem and one without, and > running both with --verbose-helpful to make sure that your settings > are what you think they are. If you verify that numerix is set > properly and still see the problem, I would like to see both scripts > in case it is exposing a problem with matplotlib. > > Of course, doing multiple import * commands is a recipe for long term > pain, especially with packages that have so much overlapping namespace > and numpy/scipy/pylab. > > JDH > |