This is a highly experimental branch migrating NumPy to the HPy C API.
This branch works with the latest HPy version 0.9.0
.
There's an example in the repo that runs and can be used to evaluate performance: numpy-gol.py
While we could previously just import the C extension module
_multiarray_umath
, we can now do the full import numpy
.
You can also run the benchmarks with:
# if built in-place, also add the current working dir to PYTHONPATH before
cd benchmarks; asv run --python=python3 -v -e
You will see a lot of warnings where we are using the legacy API since
migration is not yet finished. The warnings can be disabled using environment
variable CAPI_WARN=0
.
More on that can be found at this Wiki page.
This work is sponsored by the HPy team.
NumPy is the fundamental package for scientific computing with Python.
- Website: https://www.numpy.org
- Documentation: https://numpy.org/doc
- Mailing list: https://mail.python.org/mailman/listinfo/numpy-discussion
- Source code: https://github.com/numpy/numpy
- Contributing: https://www.numpy.org/devdocs/dev/index.html
- Bug reports: https://github.com/numpy/numpy/issues
- Report a security vulnerability: https://tidelift.com/docs/security
It provides:
- a powerful N-dimensional array object
- sophisticated (broadcasting) functions
- tools for integrating C/C++ and Fortran code
- useful linear algebra, Fourier transform, and random number capabilities
Testing:
NumPy requires pytest
and hypothesis
. Tests can then be run after installation with:
python -c 'import numpy; numpy.test()'
NumPy is a community-driven open source project developed by a diverse group of contributors. The NumPy leadership has made a strong commitment to creating an open, inclusive, and positive community. Please read the NumPy Code of Conduct for guidance on how to interact with others in a way that makes our community thrive.
The NumPy project welcomes your expertise and enthusiasm!
Small improvements or fixes are always appreciated; issues labeled as "good first issue" may be a good starting point. If you are considering larger contributions to the source code, please contact us through the mailing list first.
Writing code isn’t the only way to contribute to NumPy. You can also:
- review pull requests
- help us stay on top of new and old issues
- develop tutorials, presentations, and other educational materials
- maintain and improve our website
- develop graphic design for our brand assets and promotional materials
- translate website content
- help with outreach and onboard new contributors
- write grant proposals and help with other fundraising efforts
For more information about the ways you can contribute to NumPy, visit our website. If you’re unsure where to start or how your skills fit in, reach out! You can ask on the mailing list or here, on GitHub, by opening a new issue or leaving a comment on a relevant issue that is already open.
Our preferred channels of communication are all public, but if you’d like to speak to us in private first, contact our community coordinators at numpy-team@googlegroups.com or on Slack (write numpy-team@googlegroups.com for an invitation).
We also have a biweekly community call, details of which are announced on the mailing list. You are very welcome to join.
If you are new to contributing to open source, this guide helps explain why, what, and how to successfully get involved.