[Numpy-discussion] prerelease proposal for matrix behavior

Alan G Isaac aisaac@american....
Mon Apr 28 16:25:18 CDT 2008


On Mon, 28 Apr 2008, Timothy Hochberg apparently wrote:
> Can you clarify what you 
> mean by submatrix extraction? It sounds like you want to be able index into 
> an MxN array and get out a 1xN or Mx1 matrix. If that's the case, wouldn't 
> the natural way to spell that under the RowVector/ColumnVector approach (and 
> most others that I can think of) be:
> m2 = m1[:1] 
> or 
> m2 = m1[:,:1] 


I have tried to capture your view in proposal #6 at
<URL:http://www.scipy.org/MatrixIndexing>

Cheers,
Alan

PS I would **love** to see things go this way!
More consistency with ndarray behavior is better!!
(Note: this conflicts with current behavior,
where ``x[0]`` and ``x[0,:]`` return matrices.)





More information about the Numpy-discussion mailing list