[SciPy-User] Bottleneck 0.4.1
Tue Mar 8 21:17:40 CST 2011
On Tue, Mar 8, 2011 at 6:06 PM, Wes McKinney <email@example.com> 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
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_int32_axis0, etc, etc. Maybe that explains it? But scipy has
a lot of functions too, so I don't know.
More information about the SciPy-User