[Numpy-discussion] New patch for new mgrid / ogrid functionality

David Kaplan David.Kaplan@ird...
Tue Sep 23 02:39:53 CDT 2008


I would note that there is nothing in the API breakage that prevents
doing what Gael mentions.  The only change is that:

> > X = mgrid[0:4, 0:4, 0:4]

would be replaced with:

X = asarray( mgrid[ 0:4, 0:4, 0:4 ] )

On the other hand, not making this change makes for a strange and ugly

> Agreed. Please don't change this behavior even through a deprecation.

Long term it is bound to cause problems to have nd_grid return a list in
3 out of 4 use cases, but an array in other cases.  This function is
already quite confusing for users because it uses indexing instead of a
function call.  Adding this nuance might be great for the power user,
but will confuse most.    

I am convinced that eventually the API should be broken, the question is
just when.  If you want to put it off till "2.0", that is fine, but it
puts more onus on the release manager to do the cleanup necessary.


David M. Kaplan
Charge de Recherche 1
Institut de Recherche pour le Developpement
Centre de Recherche Halieutique Mediterraneenne et Tropicale
av. Jean Monnet
B.P. 171
34203 Sete cedex

Phone: +33 (0)4 99 57 32 27
Fax: +33 (0)4 99 57 32 95

More information about the Numpy-discussion mailing list