Pierre GM-2 wrote:
>
> On Dec 8, 2009, at 7:27 PM, John [H2O] wrote:
>> Maybe I should add, I'm looking at this thread:
>> http://old.nabble.com/masked-record-arrays-td26237612.html
>>
>> And, I guess I'm in the same situation as the OP there. It's not clear to
>> me, but as best I can tell I
On Dec 8, 2009, at 7:11 PM, John [H2O] wrote:
> My apologies for adding confusing. In answer to your first question. Yes at
> one point I tried playing with scikits.timeseries... there were some issues
> at the time that prevented me from working with it, maybe I should revisit.
What kind of issue
On Dec 8, 2009, at 7:27 PM, John [H2O] wrote:
> Maybe I should add, I'm looking at this thread:
> http://old.nabble.com/masked-record-arrays-td26237612.html
>
> And, I guess I'm in the same situation as the OP there. It's not clear to
> me, but as best I can tell I am working with structured array
Maybe I should add, I'm looking at this thread:
http://old.nabble.com/masked-record-arrays-td26237612.html
And, I guess I'm in the same situation as the OP there. It's not clear to
me, but as best I can tell I am working with structured arrays (that's from
np.rec.fromrecords creates, no?).
Anywa
Pierre GM-2 wrote:
>
>
> Did you check scikits.timeseries ? Might be a solution if you have data
> indexed in time
>
>
>> np.rec.fromrecords(codata_masked,names='datetime,lon,lat,elv,co')
>>return codata, codata_masked
>
> OK, I gonna have to guess again:
> codata is a regular ndarray, n
On Dec 8, 2009, at 5:32 PM, John [H2O] wrote:
> Pierre GM-2 wrote:
>>
>>
>>
>> masked_where is a function that requires 2 arguments.
>> If you try to mask a whole record, you can try something like
> x = ma.array([('a',1),('b',2)],dtype=[('','|S1'),('',float)])
> x[x['f0']=='a'] = ma.mas
Pierre GM-2 wrote:
>
>
>
> masked_where is a function that requires 2 arguments.
> If you try to mask a whole record, you can try something like
x = ma.array([('a',1),('b',2)],dtype=[('','|S1'),('',float)])
x[x['f0']=='a'] = ma.masked
> For an individual field, try something like
>>>
On Dec 8, 2009, at 4:53 PM, John [H2O] wrote:
> This is what I get:
>
> In [74]: type(cd)
> Out[74]:
>
> In [75]: type(cd.co)
> Out[75]:
>
> In [76]: cd[cd['co']==-.] = np.ma.masked
> ---
> ValueError
This is what I get:
In [74]: type(cd)
Out[74]:
In [75]: type(cd.co)
Out[75]:
In [76]: cd[cd['co']==-.] = np.ma.masked
---
ValueErrorTraceback (most recent call last)
/home/jfb/Research
On Dec 8, 2009, at 3:42 PM, John [H2O] wrote:
> I see record arrays don't have a masked_where method. How can I achieve the
> following for a record array:
>
> cd.masked_where(cd.co == -.)
>
> Or something like this.
masked_where is a function that requires 2 arguments.
If you try to mask a
I see record arrays don't have a masked_where method. How can I achieve the
following for a record array:
cd.masked_where(cd.co == -.)
Or something like this.
Thanks!
--
View this message in context:
http://old.nabble.com/more-recfunctions%2C-structured-array-help-tp26700380p26700380.htm
11 matches
Mail list logo