[Numpy-discussion] How do I get element on axis 1

Vishal Rana ranavishal@gmail....
Fri Apr 2 16:41:43 CDT 2010


Hi,

I know its easy, but I am not just getting it...

How do I get last element on axis=1 for:

a = 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]])

Expected: array([4, 9, 14, 19, 24])

Thanks
Vishal Rana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100402/24010176/attachment.html 


More information about the NumPy-Discussion mailing list