Thanks all, that helped me work out that I needed to try something else.
If anyone else needs to know what method worked:
big_array=N.ma.concatenate(all_FFDI)
for x in N.nditer(big_array, op_flags=['readwrite']):
if x<100:
x[...]=x=0
elif x>=100:
x[...]=x=1
sum=big_array.su
> thank you for all of the resonses, I have attempted all of the suggestions.
> It is a numpy array so I can try another list if you would prefer but I
> thought I would show the error anyway.
> the error I am receiving is
> ValueError: The truth value of an array with more than one element is
thank you for all of the resonses, I have attempted all of the suggestions.
It is a numpy array so I can try another list if you would prefer but I
thought I would show the error anyway.
the error I am receiving is
ValueError: The truth value of an array with more than one element is
ambiguous. Use
questions anon wrote:
> I have been going round in circles trying to solve something that sounds
> simple. I have a huge array and I would like to reclassify the values.
> Firstly just make them zeros and ones, for example if the values in the
> array are less than 100 make them 0 and if greater t
On Thu, 1 Sep 2011, 01:17:45 CEST, questions anon
wrote:
> Firstly just make them zeros and ones, for example if the values in the
> array are less than 100 make them 0 and if greater than 100 make them 1.
> And then finally sum them together.
> I have attempted a few methods, see code below.
Hi anonymous questioner,
Like Alan, I suspect you are using numpy as
import numpy as N
there is probably a numpy email list where this would be more appropriate
(personally I don't object, but I don't want to speak for all the subscribers).
the 2nd attempt is closer to the right answer. To he
On 01/09/11 00:17, questions anon wrote:
Dear All,
I have been going round in circles trying to solve something that sounds
simple. I have a huge array and I would like to reclassify the values.
Firstly just make them zeros and ones,...
And then finally sum them together.
And what has been the
Dear All,
I have been going round in circles trying to solve something that sounds
simple. I have a huge array and I would like to reclassify the values.
Firstly just make them zeros and ones, for example if the values in the
array are less than 100 make them 0 and if greater than 100 make them 1.