[Numpy-discussion] Rewrite np.histogram in c?

Robert McGibbon rmcgibbo at gmail.com
Mon Mar 16 00:32:49 EDT 2015


Numpy.histogram is implemented in python, and is a little sluggish. This
has been discussed previously on the mailing list, [1, 2]. It came up in a
project that I maintain, where a new feature is bottlenecked by
numpy.histogram, and one developer suggested a faster implementation in
cython [3].

Would it make sense to reimplement this function in c? or cython? Is moving
functions like this from python to c to improve performance within the
scope of the development roadmap for numpy? I started implementing this a
little bit in c, [4] but I figured I should check in here first.


[2] http://numpy-discussion.10968.n7.nabble.com/Fast-histogram-td9359.html
[3] https://github.com/mdtraj/mdtraj/pull/734
[4] https://github.com/rmcgibbo/numpy/tree/histogram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150315/84ca916d/attachment.html>

More information about the NumPy-Discussion mailing list