Michael Droettboom wrote:
>> not quite -- it would have to be re-written to use the array 
>> interface, which is different, as that can be done without requiring 
>> numpy, or its headers.
> 
> Of course, that's what I meant.  It is passed numpy arrays now -- but 
> they are accessed with all of the function call overhead of the Python 
> sequence API, rather than the numpy array interface.

right, which is slow, slower than lists. In fact, it might make sense 
for MPL to convert to a list of tuples (using numpy) first, then pass 
that to pyGTK:

l = array.tolist()

It might speed things up a bit -- it did with wxPython a while back.

>> That was true before the array interface, when supporting arrays 
>> essentially meant a dependency on numpy. That's not longer true, so 
>> it's quite likely that the pygtk folks would accept a patch -- someone 
>> still would need to write that patch, though!
> 
> Unless I misunderstand, I thought that functionality was slated for 
> inclusion in Python 3.0 -- still a long ways off in terms of adoption 
> rate.  That patch would only make sense on a pygtk branch specifically 
> intended for Python 3.0.

The array interface is slated for be built-in for Py3k, but you can use 
it in the meantime. You just need to make sure your code understands it. 
PIL, for instance, uses it for its fromarray() and toarray() methods. 
Travis O. and others on the numpy list have been very helpful to folks 
trying to add it to their packages.

-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 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to