m impossible.
>>> I have tried what you just sent but it won't just work.
>>> You could confirm this.
>>> Sent from my BlackBerry wireless device from MTN
>>>
>>> -Original Message-
>>> From: Olivier Delalleau
>>> Sender: num
t;> Sent from my BlackBerry wireless device from MTN
>>
>> -Original Message-
>> From: Olivier Delalleau
>> Sender: numpy-discussion-boun...@scipy.org
>> Date: Tue, 20 Sep 2011 12:00:51
>> To: Discussion
cipy.org
> Date: Tue, 20 Sep 2011 12:00:51
> To: Discussion of Numerical Python
> Reply-To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] Dealing with arrays
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discuss
--Original Message-
From: Olivier Delalleau
Sender: numpy-discussion-boun...@scipy.org
Date: Tue, 20 Sep 2011 12:00:51
To: Discussion of Numerical Python
Reply-To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Dealing with arrays
___
2011/9/20 DIPO ELEGBEDE
> 3. Get each array one after the other and work with it. (This is where the
> problem is).
>
> How can I fetch out array1, then array2 then array3 up to array12?
>
> Is it possible to slice?
>
>
Not really sure what your problem is, but since you should have now a list
of
gt;> Sent from my BlackBerry wireless device from MTN
>>
>> -Original Message-
>> From: josef.p...@gmail.com
>> Sender: numpy-discussion-boun...@scipy.org
>> Date: Tue, 20 Sep 2011 10:11:42
>> To: Discussion of Numerical Python
>> Reply-To: Discussio
Discussion of Numerical Python
> Reply-To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] Dealing with arrays
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.or
>
> -Original Message-
> From: josef.p...@gmail.com
> Sender: numpy-discussion-boun...@scipy.org
> Date: Tue, 20 Sep 2011 10:11:42
> To: Discussion of Numerical Python
> Reply-To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] Dealing with arr
discussion-boun...@scipy.org
Date: Tue, 20 Sep 2011 10:11:42
To: Discussion of Numerical Python
Reply-To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Dealing with arrays
On Tue, Sep 20, 2011 at 10:06 AM, wrote:
> Hi Chico, my list needs to be converted to a numpy array first
011 11:00:08
> To: Discussion of Numerical Python
> Reply-To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] Dealing with arrays
>
> What about:
>
>>>> listoflists = [[1,1,1], [1,2,3], [2,2,2]]
>>>> for eachlist in listoflists:
> ... prin
08
> To: Discussion of Numerical Python
> Reply-To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] Dealing with arrays
>
> What about:
>
> >>> listoflists = [[1,1,1], [1,2,3], [2,2,2]]
> >>> for eachlist in listoflists:
> ...
-discussion] Dealing with arrays
What about:
>>> listoflists = [[1,1,1], [1,2,3], [2,2,2]]
>>> for eachlist in listoflists:
... print eachlist.count(1), eachlist.count(2), eachlist.count(3)
...
3 0 0
1 1 1
0 3 0
>>>
Chico
> Hi All,
>
> I am extracting a l
What about:
>>> listoflists = [[1,1,1], [1,2,3], [2,2,2]]
>>> for eachlist in listoflists:
... print eachlist.count(1), eachlist.count(2), eachlist.count(3)
...
3 0 0
1 1 1
0 3 0
>>>
Chico
> Hi All,
>
> I am extracting a list of lists from an application. In this case, my list
> has 12 lis
To: Discussion of Numerical Python
Reply-To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Dealing with arrays
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Let's say your "list of lists" is called my_list, and assuming you are using
python 2.7+:
import collections
import numpy
for tmp_list in my_list:
array = numpy.array(tmp_list)
counts = collections.Counter(array)
print counts
Note that you don't even need to use numpy for that (you ca
Hi All,
I am extracting a list of lists from an application. In this case, my list
has 12 lists.
I then coverted each list into a numpy array. This returns 12 different
arrays. Very well. The 12 different arrays are like as follows:
[2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 2
16 matches
Mail list logo