[Numpy-discussion] matrix indexing question

Bill Baxter wbaxter at gmail.com
Tue Mar 27 00:21:23 EDT 2007


On 3/27/07, Alan Isaac <aisaac at american.edu> wrote:
> May I see a use case where the desired
> return when iterating through a matrix
> is rows as matrices?  That has never
> been what I wanted.

If you use a row vector convention it make plenty of sense.

AllMyPoints = mat(rand(100,2)) # 100 two-d points
for pt in AllMyPoints:
    xformedPt = pt * TransformMatrix
    # do something to transformed point

--bb



More information about the NumPy-Discussion mailing list