[SciPy-user] Questions on scipy.io.read_array()

David Huard david.huard at gmail.com
Thu Feb 21 12:49:15 EST 2008


Charlie,

Numpy has a module called ma providing an array object that deals with
missing values. It still lack however an official loadtxt function, but I
worked on one a while ago. If you end up using it, I'd be grateful if you
could provide some feedback. As for the bug in scipy.io, I think this
function is being replaced by numpy.loadtxt.

If you are dealing with time series, look at the timeseries module in
scikits (only in SVN for now).

Cheers,

David



2008/2/20, charlie <charlie.xia.fdu at gmail.com>:
>
> Hi,
>
> I am a newbie to scipy.
> I am currently using it to deal with some statistical problems with
> possible missing values.
> these values are labeled 'na' in my data file.
> However when I tried to read in my data into an array and substitute 'na'
> with -1 (for example) by:
> read_array( datafile, ..., missing=-1)
> The array I got doesn't cast 'na' value into -1, but 0 - the default value
> of parameter "missing".
> And when I check mail list, I found the issue has already be raised by
> Joris De Ridder:
>
> http://article.gmane.org/gmane.comp.python.scientific.user/3700/match=read%5farray+missing
> So I guess there is something wrong with regard to scipy.io library.
> Does anybody come across the same problem?
> Should I raise a ticket for this seemingly bug?
>
> Also, I'd like to ask for two general questions:
> first, how efficient is python+numpy+scipy 's with major calls to
> statistics distribution functions,
> as compared to Matlab, C++ with CEPHES or GSL, and etc.
> I compared it with my old R program, it seems python+numpy+scipy is little
> bit faster.
> Can anybody provide with some references to this?
>
> Another question is there a good package handle missing values well within
> scipy?
> Such as it can store the value as missing and fill it with different
> inference method when desired.
>
> Thanks!
>
> Charlie
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080221/150a00c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.dat
Type: application/octet-stream
Size: 1392 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080221/150a00c7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadtxt.py
Type: application/octet-stream
Size: 4726 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080221/150a00c7/attachment-0001.obj>


More information about the SciPy-User mailing list