[SciPy-Dev] improvement to binned statistic

Ralf Gommers ralf.gommers at gmail.com
Wed Sep 18 09:02:17 EDT 2019


Hi Edouard,


On Wed, Sep 18, 2019 at 11:29 AM Edouard Goudenhoofdt <egouden at gmail.com>
wrote:

> Dear scipy developers,
>
> One could use scipy.stats.binned_statistic_dd for the same sample points
> but for values available at different times.
> Currently this involves the computation of the bin numbers every time the
> function is called.
> Therefore I would like to add an optional argument "binnumbers" to skip
> this step when calling the function again.
>

That seems sensible. Could you check that creating the bin numbers really
takes the majority of the time? There's also a fair amount of input
validation that shouldn't be skipped even when a new `binnumbers` is passed
in. If that is the case, sending a PR with a benchmark would be very
welcome.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190918/0113574d/attachment.html>


More information about the SciPy-Dev mailing list