Re: [Numpy-discussion] Extracting individual columns in Numpy (suchith)

2014-10-09 Thread Juan
> Date: Thu, 09 Oct 2014 11:12:31 +0530 > From: suchith > Subject: [Numpy-discussion] Extracting individual columns in Numpy > To: numpy-discussion@scipy.org > Message-ID: <54362047.10...@gmail.com> > Content-Type: text/plain; charset="utf-8" > > How to

Re: [Numpy-discussion] Extracting individual columns in Numpy

2014-10-08 Thread suchith
Ok...I got it. Sorry for stupid question. On Thursday 09 October 2014 11:12 AM, suchith wrote: > 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

Re: [Numpy-discussion] Extracting individual columns in Numpy

2014-10-08 Thread Andrew Nelson
>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? The feature is already there: a[:

Re: [Numpy-discussion] Extracting individual columns in Numpy

2014-10-08 Thread Nathaniel Smith
On Thu, Oct 9, 2014 at 6:42 AM, suchith wrote: > 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.

[Numpy-discussion] Extracting individual columns in Numpy

2014-10-08 Thread suchith
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]] the