Skip to main content

Fast numpy ufunc operations

Project description

fastfunc

CircleCI codecov Code style: black speedy PyPi Version GitHub stars

NumPy's own ufunc operations are handy, but can be quite slow (see https://github.com/numpy/numpy/issues/5922 and https://github.com/numpy/numpy/issues/11156). Use fastfunc as a drop-in replacement

# import numpy
# numpy.add.at(target, idx, vals)

import fastfunc
fastfunc.add.at(target, idx, vals)

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

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

Installation

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

pip install -U fastfunc

to install or upgrade.

Testing

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

pytest

Distribution

To create a new release

  1. bump the __version__ number,

  2. publish to PyPi and tag on GitHub:

    $ make publish
    

License

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
fastfunc-0.1.6.tar.gz (6.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page