[SciPy-dev] time series implementation approach
Pierre GM
pgmdevlist at gmail.com
Wed Dec 13 13:29:46 EST 2006
> implementation could be to make a callback to python, but I'm pretty sure
> Travis has something in the API that would allow this directly from the C
> code (PyUFunc_O_O_method ?)
David,
I think it'd be easier if the C grouping function send back an array that you
would have to process, for several reasons:
- you have full control on the postprocessing
- you don't have to group your data each time you need a new postprocessing
- masked data are very easy to deal with in python, and I can only assume that
they're more difficult to deal with in C.
Suppose you have your daily series that you resampled to monthly: with this
approach, you just group data once, and then can compute your mean and
variance on the groups. you need a median ? Well, your data's already
grouped. There were gaps in your data ? Well, you have masked values.
Matt pointed quite justly that this approach doesn't work for some
pathological cases, but that shouldn't be that common...
More information about the SciPy-Dev
mailing list