[Numpy-discussion] Selecting columns of a matrix (original) (raw)
Keith Goodman kwgoodman at gmail.com
Tue Jun 20 23:04:24 EDT 2006
- Previous message (by thread): [Numpy-discussion] array creation speed comparison
- Next message (by thread): [Numpy-discussion] Selecting columns of a matrix
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a matrix M and a vector (n by 1 matrix) V. I want to form a new matrix that contains the columns of M for which V > 0.
One way to do that in Octave is M(:, find(V > 0)). How is it done in numpy?
- Previous message (by thread): [Numpy-discussion] array creation speed comparison
- Next message (by thread): [Numpy-discussion] Selecting columns of a matrix
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]