astrofrog / fast-histogram

:zap: Fast 1D and 2D histogram functions in Python :zap:
BSD 2-Clause "Simplified" License
267 stars 28 forks source link

allow density/normed argument #8

Open bastibe opened 7 years ago

bastibe commented 7 years ago

Thank you for your cool package!

numpy.histogram and numpy.histogram2d support the normed argument, which divides counts by the number of samples and the bin width/area. It would be great if fast-histogram could support this as well.

astrofrog commented 7 years ago

@bastibe - would you be interested in opening a pull request to add these options? I think that the default values that Numpy use mean that this won't add much overhead for the default use case.

bastibe commented 7 years ago

Sure, I can do that. It will take a few days, though.