[Numpy-discussion] matrix indexing question

Alan G Isaac aisaac at american.edu
Thu Mar 29 20:48:43 EDT 2007


On Thu, 29 Mar 2007, Bill Spotz apparently wrote: 
> What I envisioned was that M[i,:] would return 
> a row_vector and M[:,j] would return a column_vector, 
> because this would be symmetric behavior.  M[i], by 
> convention, would behave the same as M[i,:]. 

Can you please be explicit about the value added by that 
convention, as you see it?

Thank you,
Alan Isaac

PS I assume your "vector" class would always accept a single index,
for both row and column vectors?  What is the return type of v[i]?




More information about the NumPy-Discussion mailing list