pynumerics
RMC.Numerics for Python. The wheel ships the Numerics.dll assembly from the published
RMC.Numerics NuGet package, byte for byte, with a loader that starts one .NET runtime and one
Numerics assembly per process, and typed wrappers over every Numerics area: univariate and
multivariate distributions, copulas, statistics, hypothesis tests, sampling, MCMC and the
bootstrap, integration, differentiation, root finding and ODEs, optimization, special functions,
linear algebra and Fourier transforms, data and time series, and machine learning.
The wrappers do no numerical work in Python. Arrays cross between NumPy and .NET in bulk, bit for bit, every wrapper raises Python exceptions with the Numerics messages, and functions can be Python callables or C# source compiled with the bundled Roslyn compiler. The distribution version equals the RMC.Numerics version of the bundled assembly.
Install
pip install pynumerics==2.3.0
The 2.3.0 wheel bundles Numerics.dll from the RMC.Numerics 2.3.0 NuGet package. Requirements:
CPython 3.11 to 3.14 on Linux or Windows, and the .NET 10 runtime (Microsoft.NETCore.App 10.0).
Set DOTNET_ROOT when .NET is not installed in the default location.
from pynumerics import distributions
gev = distributions.GeneralizedExtremeValue(location=10.0, scale=2.0, shape=-0.1)
print(gev.inverse_cdf([0.5, 0.99, 0.999])) # one call into InverseCDF(IList<double>)
Documentation
The user guide and the API reference are in
docs/: start with
getting started,
which covers installation, PYNUMERICS_DLL_DIR and runtime selection, arrays and errors, value
semantics, callbacks and migration from rmc-numerics. The
changelog lists
the changes of each release. Build the HTML pages, including the API
reference generated from the docstrings, from python/pynumerics:
python -m pip install -e ".[docs]"
python -m sphinx -W --keep-going -b html docs docs/_build/html
Releases are published to PyPI by .github/workflows/PythonPublish.yml with trusted publishing.
It starts by itself when NuGetPublish.yml has pushed RMC.Numerics X.Y.Z to nuget.org for the
GitHub Release vX.Y.Z: it waits until nuget.org serves the package, builds the wheel from it,
tests it on Linux and Windows, and uploads it to TestPyPI and then, after the pypi environment's
reviewer approves, to PyPI. _version.py must already declare X.Y.Z; no commit is needed after the
NuGet release, because the wheel build writes the package's SHA-256 into the wheel.
Build and test
From python/pynumerics:
python scripts/build_wheel.py --stage-only # stage _bin/Numerics.dll and the Roslyn assemblies
python -m pip install -e ".[test]"
python -m pytest # includes tests/test_docs.py: every docs code block
python scripts/build_wheel.py # build dist/pynumerics-<version>-py3-none-any.whl
The script takes Numerics.dll from lib/net10.0 of the RMC.Numerics package in the
NuGet global packages folder (or --nupkg PATH, or --download from nuget.org), or a locally
built assembly with --dll PATH. It reads the version, the assembly version and the SHA-256 of
that file, refuses a version or assembly version that differs from src/pynumerics/_version.py,
and writes all three into the wheel's _version.py (the tracked file keeps NUMERICS_SHA256
empty, so assert_numerics_identity() needs an explicit sha256 in a source checkout). It stages
Microsoft.CodeAnalysis.dll and Microsoft.CodeAnalysis.CSharp.dll from lib/net9.0 of the
Microsoft.CodeAnalysis.Common and Microsoft.CodeAnalysis.CSharp 4.14.0 packages (NuGet cache, or
--download), each checked against its ROSLYN_*_SHA256 pin; --roslyn-only stages only those.
To test against a locally built assembly, set PYNUMERICS_DLL_DIR to
Numerics/bin/Release/net10.0, or build a wheel from it as the pull request check does:
dotnet build ../../Numerics/Numerics.csproj -c Release -f net10.0
python scripts/build_wheel.py --dll ../../Numerics/bin/Release/net10.0/Numerics.dll --download
The same checks run on Linux in the .github/docker/linux-test image, from the repository root:
docker build -t numerics-linux-test .github/docker/linux-test
docker run --rm -v "$PWD:/src:ro" -v "$PWD/python/pynumerics/dist:/out" numerics-linux-test
docker run --rm -v "$PWD/python/pynumerics/dist:/dist:ro" numerics-linux-test identity-check.sh /dist
The first run builds and tests Test_Numerics (net10.0), builds the wheel from that build and runs
ruff and pytest against it; CHECKS="wheel pytest" skips the .NET tests. The second installs the
wheel in a fresh container and checks the identity of the loaded assembly.
Metadata
Release files for pynumerics 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynumerics-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for pynumerics-2.3.0-py3-none-any.whl |
Release files / pynumerics-2.3.0-py3-none-any.whl
| Download URL | pynumerics-2.3.0-py3-none-any.whl |
|---|---|
| Size | 5.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afa4c7c5e9075be8fe19616b06cd5d0ecec1cf0d966d2638069791103115044c
|
|
BLAKE2b-256 checksum How to use checksums |
6dd58e59612a935a1b43047d440f10f00bded4e7ee89d2a8b8aa485513ec9309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 11, 2026.
Transparency logSecurity for pynumerics 2.3.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 pynumerics-2.3.0-py3-none-any.whl
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 Nov 11, 2026.
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.