xgcm / xhistogram

Fast, flexible, label-aware histograms for numpy and xarray
https://xhistogram.readthedocs.io
MIT License
90 stars 20 forks source link

Histogram of weights/ n-D histograms #22

Open dhruvbalwada opened 4 years ago

dhruvbalwada commented 4 years ago

Is it possible to easily extend the functionality to include the histogram of the weights for a particular bin? The current weights options gives a sum, but sometimes it would useful to look at the distribution of the points within a certain bin.

dhruvbalwada commented 4 years ago

This might be equivalent to estimating a 3D (or nD) histogram. Can we do that?

dhruvbalwada commented 4 years ago

Should we be transitioning over to https://boost-histogram.readthedocs.io/en/latest/notebooks/BoostHistogramHandsOn.html#3:-More-dimensions instead of xhistogram (since it also claims to be faster)? Has anyone tried it out? Or are there any advantages to sticking with xhistogram (the API of xhistogram is quite nice)?

dougiesquire commented 3 years ago

Should we be transitioning over to https://boost-histogram.readthedocs.io/en/latest/notebooks/BoostHistogramHandsOn.html#3:-More-dimensions

I've only looked very briefly, but it doesn't look as though boost-histogram handles dask arrays

dcherian commented 3 years ago

See https://github.com/douglasdavis/dask-histogram

dougiesquire commented 2 years ago

Also, just stumbled across https://github.com/Descanonge/xarray-histogram