469,917 Members | 1,977 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Slicing matrix

I am using numarray.

Suppose I have
p = array(range(25), shape=(5,5))
p

array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19],
[20, 21, 22, 23, 24]])

How do I easily slice out [0,1,2] or [1,2,3] or
[2,7,12] or [7,12,17] and put it in a list?

I checked the documentation at
http://www.esrf.fr/computing/bliss/p...ml/node26.html
, but could not get it.

Thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Apr 18 '06 #1
0 828

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Raoul Gough | last post: by
9 posts views Thread by Jerry Sievers | last post: by
3 posts views Thread by Bryan Olson | last post: by
17 posts views Thread by Jon Slaughter | last post: by
17 posts views Thread by baibaichen | last post: by
1 post views Thread by Bart Simpson | last post: by
2 posts views Thread by Rahul | last post: by
1 post views Thread by Erik Lind | last post: by
1 post views Thread by subramanian100in | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.