[SciPy-user] timeseries import error

David Huard david.huard@gmail....
Fri Jan 18 11:09:02 CST 2008


Hi Willi,

There are a number of conflicts between maskedarray, timeseries and scipy.
This is my understanding of the situation:

The current timeseries depends on scipy.sandbox.maskedarray, but as you have
seen, it doesnt't work so well.
timeseries can be easily modified to depend on the ma module in the numpy
maskedarray branch, but since the branch dates from about two months, the
latest changes to numpy haven't  been merged and scipy is currently
imcompatible with the numpy's maskedarray branch. As a consequence,
timeseries (depending on scipy.io for instance) won't import.

What seems to work is to revert to a previous version of scipy (I used the
latest binary release for my distro).

So you can try to
1. install the numpy masked array branch.
2. Install a binary scipy release
3. Apply the attached patch to timeseries, converting import from
scipy.sandbox.maskedarray to numpy.ma

Good luck,

David

2008/1/18, Willi Richert <w.richert@gmx.net>:
>
> Hallo,
>
> Hi,
>
> I've installed timeseries from the sandbox package. Having the latest
> scipy/numpy versions I get:
>
> In [1]: from timeseries.lib.moving_funcs import mov_average_expw as
> mov_avg
> ---------------------------------------------------------------------------
>
> <type 'exceptions.ImportError'>           Traceback (most recent call
> last)
>
> /home/wr/wlan/<ipython console> in <module>()
>
> /usr/lib/python2.5/site-packages/timeseries/__init__.py in <module>()
>      13
>      14 import const
> ---> 15 import dates
>      16 from dates import *
>      17 import tseries
>
> /usr/lib/python2.5/site-packages/timeseries/dates.py in <module>()
>      26 from numpy.core.numerictypes import generic
>      27
> ---> 28 import maskedarray as MA
>      29
>      30 from parser import DateFromString, DateTimeFromString
>
> /usr/lib/python2.5/site-packages/maskedarray/__init__.py in <module>()
>      15 from core import *
>      16
> ---> 17 import extras
>      18 from extras import *
>      19
>
> /usr/lib/python2.5/site-packages/maskedarray/extras.py in <module>()
>      36 from numpy.core.fromnumeric import asarray as nxasarray
>      37
> ---> 38 from numpy.lib.index_tricks import AxisConcatenator
>      39 import numpy.lib.function_base as function_base
>      40
>
>
> Regards,
> wr
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080118/07bd3324/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ma_branch.patch
Type: text/x-patch
Size: 12071 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20080118/07bd3324/attachment-0001.bin 


More information about the SciPy-user mailing list