[SciPy-User] Bottleneck 0.4.1
Tue Mar 8 22:18:05 CST 2011
On Tue, Mar 8, 2011 at 10:17 PM, Keith Goodman <email@example.com> wrote:
> On Tue, Mar 8, 2011 at 6:06 PM, Wes McKinney <firstname.lastname@example.org> wrote:
>> Any interest adding a "min_periods" argument to the moving window
>> functions in bottleneck?
> Each moving window function in Bottleneck has a NaN version and a
> non-NaN version, so move_nanmean() and move_mean(), for example.
> Pandas has one version but you can adjust the min_periods to get
> either the NaN or non-NaN version or anything in between. That's
Yes, this way you only need one API function. If you don't specify
min_periods, you get the move_* function and if you do, then you get
move_nan* but requiring a certain number of observations. Some
performance is sacrificed but perhaps for the greater good :)
> The rest of Bottleneck uses the NaN and non-NaN naming, for example,
> nanmedian and median. I think it is simpler (to discover what
> Bottleneck can do for example) to stick with that. Much harder to
> explain that the functionality is in a parameter that most users
> haven't seen before. But let me think about it. It would be useful.
>> One random question. Any idea on the long import time:
>> $ time python -c "import bottleneck"
>> real 0m0.712s
>> user 0m0.546s
>> sys 0m0.114s
>> $ time python -c "import numpy"
>> real 0m0.142s
>> user 0m0.090s
>> sys 0m0.049s
>> $ time python -c "import scipy"
>> real 0m0.201s
>> user 0m0.132s
>> sys 0m0.066s
> Bottleneck has many low-level functions, for example,
> median_2d_float64_axis0, median_2d_float64_axis1,
> median_2d_int32_axis0, etc, etc. Maybe that explains it? But scipy has
> a lot of functions too, so I don't know.
Yeah, I thought this was odd. Initially I thought perhaps it was due
to the size of the DLLs. func.so and move.so but they are only 3 mb or
so on my machine.
> SciPy-User mailing list
More information about the SciPy-User