Re: [Numpy-discussion] Numpy Help

2011-07-29 Thread DIPO ELEGBEDE
Thanks Martins, that did the magic. Thanks so much. I'm on the tutorials now. Regards. On 29 Jul 2011 15:24, "Martin Ling" wrote: > On Fri, Jul 29, 2011 at 02:55:15PM +0100, DIPO ELEGBEDE wrote: >> >> I have a 4 by 4 matrix filled with 0s, 1s and 2s. >> I want to loop through the whole matrix to

Re: [Numpy-discussion] Numpy Help

2011-07-29 Thread Martin Ling
On Fri, Jul 29, 2011 at 02:55:15PM +0100, DIPO ELEGBEDE wrote: > >I have a 4 by 4 matrix filled with 0s, 1s and 2s. >I want to loop through the whole matrix to get the fields with 1s and 2s >only and then count how many ones and how many twos. Try this: >>> m = matrix('1,2,0,2;2,2,1,

[Numpy-discussion] Numpy Help

2011-07-29 Thread DIPO ELEGBEDE
Hi All, I am fresh on this list and would be looking forward to as much help as I can get. I am hoping to develop ino helping others too after a short while. Kindly help me with this task. I would appreciate if you can point me to an example or brief explanation. I have a 4 by 4 matrix filled w