suggestions for slices of matrices
JJ
josh8912 at yahoo.com
Tue Oct 10 02:17:28 EDT 2006
Hello.
I haven't been following development too closely
lately, but I did just download and reinstall the
current svn version. For what its worth, I would like
to again suggest two changes:
-- If M is a nxm matrix and P and Z are nx1 (or 1xn)
matrices, then it would be nice if we could write
M[P==Z,:] to obtain all columns and only those rows
where P==Z. Likewise, for 1xm (or mx1) matrices U and
V, it would be nice to be able to use M[P==Z,U==V].
Also, it would be nice to use M[P==Z,U==2], for
example, to obtain selected rows where matrix U is
equal to a constant.
-- It would be nice to slice a matrix by using
M[[1,2,3],[3,5,7]], for example.
I believe this would help make indexing more user
friendly. In my humble opinion, I think indexing is a
weak spot in numpy. I find that most of my debugging
involves finding the right code to make a matrix slice
the way I want it.
John
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
More information about the NumPy-Discussion
mailing list