
Dear sir, Can we take a numpy array excluding particular columns Example: A=[[ 20. 71. 57.5] [ 21. 71. 56. ] [ 22. 71. 74.3] [ 23. 71. 66. ] [ 24. 71. 96.5] [ 25. 71. 61.7] [ 20. 72. 72.9] (Here i am give up the last column) The answer should be [[ 20. 71. ] [ 21. 71. ] [ 22. 71. ] [ 23. 71. ] [ 24. 71. ] [ 25. 71. ] [ 20. 72. ] Please help me ............................... -- DILEEPKUMAR. R J R F, IIT DELHI

I think A[:,0:2] should give you what you want. On 27/03/2011, at 6:24 PM, dileep kunjaai wrote:
Dear sir, Can we take a numpy array excluding particular columns Example: A=[[ 20. 71. 57.5] [ 21. 71. 56. ] [ 22. 71. 74.3] [ 23. 71. 66. ] [ 24. 71. 96.5] [ 25. 71. 61.7] [ 20. 72. 72.9] (Here i am give up the last column)
The answer should be [[ 20. 71. ] [ 21. 71. ] [ 22. 71. ] [ 23. 71. ] [ 24. 71. ] [ 25. 71. ] [ 20. 72. ]
Please help me ...............................
-- DILEEPKUMAR. R J R F, IIT DELHI
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_________________ Dr Andrew Nelson andyfaff@gmail.com _________________

Thank you sir thank you very much...... sir i got a new flexible command:
delete(a, s_[1:3], axis=1) # remove columns 1 and 2 http://www.scipy.org/Numpy_Example_List#head-2413c07da8954330701674ff8e950c4...
On Sun, Mar 27, 2011 at 1:18 PM, andrew nelson <andyfaff@gmail.com> wrote:
I think A[:,0:2] should give you what you want.
On 27/03/2011, at 6:24 PM, dileep kunjaai wrote:
Dear sir, Can we take a numpy array excluding particular columns Example: A=[[ 20. 71. 57.5] [ 21. 71. 56. ] [ 22. 71. 74.3] [ 23. 71. 66. ] [ 24. 71. 96.5] [ 25. 71. 61.7] [ 20. 72. 72.9] (Here i am give up the last column)
The answer should be [[ 20. 71. ] [ 21. 71. ] [ 22. 71. ] [ 23. 71. ] [ 24. 71. ] [ 25. 71. ] [ 20. 72. ]
Please help me ...............................
-- DILEEPKUMAR. R J R F, IIT DELHI
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_________________ Dr Andrew Nelson andyfaff@gmail.com _________________
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
-- DILEEPKUMAR. R J R F, IIT DELHI
participants (2)
-
andrew nelson
-
dileep kunjaai