[Numpy-discussion] Release of NumPy
Gael Varoquaux
gael.varoquaux@normalesup....
Wed Apr 16 17:34:19 CDT 2008
On Wed, Apr 16, 2008 at 06:02:53PM -0400, Alan G Isaac wrote:
> On Wed, 16 Apr 2008, Stéfan van der Walt apparently wrote:
> > I showed you exactly where your proposal breaks down --
> > numerous times: x[0] is no longer the same as x[0,:]
> And as I explained back: this is a good thing (TM).
> There is no need for these to be the same.
[...]
> What it gains is that x[i][j] == x[i,j].
I am sorry, I don't see why you prioritize "x[i][j] == x[i,j]" (1) more than
"x[0] == x[0,:]" (2).
For me it is the other way around, because we should be encouraging users
not to use "x[i][j]", which is a very poor way of indexing compared to
"x[i,j]". The first requires two __getitem__ calls and an object
creation, whereas the first requires only one, and no object creation.
Gaël
More information about the Numpy-discussion
mailing list