How to extract individual columns from a numpy array?
For example, consider this script

import numpy as np
a = np.array([[1,2,3],[4,5,6],[7,8,9]])
a[0][:]
a[:][0]

Now both a[:][0] and a[0][:] are outputting the same result, i.e np.array([1,2,3]). If I want to extract the array [[1],[4],[7]] then what should I do? Is it possible to add this feature? If so, which file(s) should I edit?

I know C,C++ and Python programming and I am new to open-source software development. Please help me.

I have attached the screenshot with this mail.

Thanks
Suchith.J.N

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to