Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
pybind11-numpy-example
Advanced tools
A simple example of how to use pybind11 with numpy and publish this as a library on PyPI and conda-forge.
This C++/Python library creates a std::vector
of 16-bit ints,
and provides a Python interface to the contents of this vector in a few different ways:
Python Lists are great! However, when storing many small elements of the same type, a Numpy array is much faster and uses a lot less memory:
The pybind11 code is in src/pybind11_numpy_example_python.cpp.
The python package is defined in pyproject.toml and uses scikit-build-core.
Each tagged commit triggers a GitHub action job which uses cibuildwheel to build and upload a new release including binary wheels for all platforms to PyPI.
The conda-forge package is generated from this recipe, and automatically updates when a new version is uploaded to PyPI.
The scripts used to generate the above plots are in scripts.
This repo was quickly set up using the SSC C++ Project Cookiecutter.
FAQs
An example of using numpy with pybind11
We found that pybind11-numpy-example demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.