Rob Hetland wrote:
> First, it has bothered me that from pylab import * and from numpy  
> import * both import 'load' statements. Yes, I realize that I can put  
> them in their own name space, but I only use python for mpl and numpy  


That's why: "Namespaces are one honking great idea". They really are. 
Trust me on this.

Also, doesn't pylab hold all of numerix anyway? Why do you need both?

If you want to use the latest numpy API (which I do) then again -- 
"Namespaces are one honking great idea". This is what they are for.

Otherwise, you're stuck with using numerix and waiting until MPL goes 
pure numpy ( I don't know when that might be). pylab and numpy stomp all 
over each other (if you use import *) by design.

It comes down to this: if you use "import *" you're forced to use the 
decision made by others -- the numerix API, which, quite reasonably, 
they are keeping backward compatible.

Is it really that hard to use this?

import numpy as N # or "as npy", the mpl standard.

a = N.arange(10)

a.sum()

etc, etc...

One of the nice things about numpy is that there are lot more array 
methods, rather than functions, so it works better with namespaces -- 
you really don't need to type the "N." all that much.

from pylab import *
import numpy as N

May be a reasonable compromise.

 > -- for me python is a matlab replacement.

In many ways it is for me too, but it's so much better! take advantage 
of the advantages -- like namespaces.

If you're anything like me, you may not be writing big programs, but 
even quickie scripts are edited and re-edited a lot -- a little extra 
typing makes little difference.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to