[Numpy-discussion] Numeric3

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Mon Feb 7 01:57:23 EST 2005

On 06.02.2005, at 19:13, Andrew Straw wrote:

> While energy is put into re-coding an array package, I'd like to bring 
> up an interesting idea brought up on matplotlib-users by Norbert 
> Nemec: http://sourceforge.net/mailarchive/message.php?msg_id=10528079

My summary of what he is saying is "define flexible enough interfaces, 
and then people can write implementations the fit their needs". Which 
is a very good idea.

Note that all his examples are cases where Python chose to use 
functions where OO principles would suggest methods. If abs(), round(), 
min() etc. were methods from the start, there wouldn't be any problem 
to solve (of course they are not for a very good reason: notational 
habit). The same applies to the math module or the ufunc module in 
Numeric - there would be no need for ufunc if math simply defined 
syntactic sugar for method calls.

I wonder if it is possible to come up with an abstract API for arrays 
that would permit alternate implementations to be chosen as late as 
possible, even at runtime. That could help to get over the 
Numeric/numarray split.


More information about the NumPy-Discussion mailing list