Skip to main content

Fast numpy ufunc operations

Project description


CircleCI codecov Code style: black speedy PyPi Version GitHub stars PyPi downloads

NumPy's own ufunc operations are handy, but can be quite slow (see and Use fastfunc as a drop-in replacement

# import numpy
#, idx, vals)

import fastfunc, idx, vals)

# If you really only need _add_, you can use
# numpy.bincount(idx, weights=vals, minlength=target.shape[0])

to get a speed-up by a factor of 40.

This is achieved by moving the operations to C++ using pybind11.


fastfunc is available from the Python Package Index, so simply do

pip install -U fastfunc

to install or upgrade.


To run the fastfunc unit tests, check out this repository and type



fastfunc is published under the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fastfunc, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size fastfunc-0.2.3.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page