npynuma
NUMA node allocation for NumPy arrays on Linux
Install System Requirements
# Ubuntu/Debian
sudo apt install libnuma-dev
# Fedora/CentOS
sudo dnf install numactl-devel
# Python package
git clone https://github.com/xsgeng/npynuma
cd npynuma
pip install .
pip install npynuma # not yet
Quick Start
import numpy as np
from npynuma import NumaPolicy
with NumaPolicy(node=1): # Allocate on NUMA node 1
large_array = np.empty(10_000_000) # 80MB array on node 1
# Works with existing numpy functions
with NumaPolicy(node=0):
random_data = np.random.normal(size=1_000_000)
Notes
- Requires Linux NUMA system (
numactlinstalled) - Node numbers must exist on your system
Thread Safety
⚠️ Not thread-safe - The NUMA policy context is global to the process.
Avoid using NumaPolicy contexts concurrently in:
- Multithreaded applications
- Async frameworks
- Any parallel code sharing NumPy allocations
Metadata
Release files for npynuma 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| npynuma-0.1.0.tar.gz | 5.0 kB | With provenance | Details for npynuma-0.1.0.tar.gz |
Release files / npynuma-0.1.0.tar.gz
| Download URL | npynuma-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10e6528fbdf6f9df4d53de0f150a8376ba5f96f95b38e255ab60d90f21dee40c
|
|
BLAKE2b-256 checksum How to use checksums |
9f1c75a80a16e2c8e12cb4d0dc6d0aafc04d6ff93388fe48238ddbdd339d7362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 15, 2025.
Transparency logSecurity for npynuma 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for npynuma-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 15, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.