[Numpy-discussion] untenable matrix behavior in SVN

Alan G Isaac aisaac@american....
Fri Apr 25 12:40:29 CDT 2008


On Fri, 25 Apr 2008, Stéfan van der Walt wrote:
> workaround would break x[0] == x[0,:] 


But there is not universal agreement that x[0] == x[0,:] is 
desirable.  In contrast, there *is* universal agreement that
x[0][0]==x[0,0] is desirable.  Or so I've understood the 
discussion.

As you know, my view is that nonscalar indexing should
return submatrices, while scalar indexing should return
1d arrays.  Thus I do not see  x[0] != x[0,:] as breakage:
it is desirable.  Indeed, without it, we will have an
untenable situation, under all the different proposals.
So it is a goner one way or another.

Cheers,
Alan Isaac





More information about the Numpy-discussion mailing list