[SciPy-User] scikits.timeseries, element-wise allocation with double boolean expressions

Martin Enlund martin.enlund at gmail.com
Tue Sep 29 16:52:27 EDT 2009


Hi there. I am sure this is simple to do, but since I am failing all
the time I turn to you!

I am trying something like this: (dest,a,b,c,d are all the simplest
possible timeseries)
dest[:]=0
dest[a > b and c > d] = 1

I've tried something like this, to no avail:
c = ts.time_series(zip(a > b, c > d), dtype=[('ab', float), ('cd',
float)],                                start_date=a.start_date)

Error:
    d = self.filled(True).all(axis=axis).view(type(self))
TypeError: cannot perform reduce with flexible type



More information about the SciPy-User mailing list