[SciPy-User] usemask kwd in timeseries.tsfromtxt missing?
Pierre GM
pgmdevlist at gmail.com
Mon Mar 15 12:01:26 EDT 2010
On Mar 14, 2010, at 6:32 PM, Tim Michelsen wrote:
>> data = ts.tsfromtxt(s, delimiter=",", dtype=None,
>> dateconverter=dateconverter, names=True, usemask=True)
>> #TypeError: tsfromtxt() got an unexpected keyword argument 'usemask'
>>
>> data = ts.tsfromtxt(s, delimiter=",", dtype=None,
>> dateconverter=dateconverter, names=True)
>> hasattr(data,'mask')
>> # True
>>
>> print ts.tsfromtxt.__doc__
>> <snip>
>> usemask : bool, optional
>> If True, return a masked array.
>> If False, return a regular array.
>> <snip>
> I never really cared about whether a masked array is created or not.
> Does this really make a difference in your work?
> Let's wait for a comment from Pierre GM?
All,
I only have episodic connectability these days, sorry for the lag in answers.
In np.genfromtxt, `usemask` lets you choose whether you want a standard ndarray (False) or a MaskedArray (True).
In `scikits.timeseries.tsfromtxt`, the output is always a TimeSeries, which is a subclass of MaskedArray. Therefore, `usemask` would always be True. No need for a keyword argument that you can't modify, hence the error message.
More information about the SciPy-User
mailing list