NumSharp 0.80.0

dotnet add package NumSharp --version 0.80.0
                    
NuGet\Install-Package NumSharp -Version 0.80.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NumSharp" Version="0.80.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NumSharp" Version="0.80.0" />
                    
Directory.Packages.props
<PackageReference Include="NumSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NumSharp --version 0.80.0
                    
#r "nuget: NumSharp, 0.80.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NumSharp@0.80.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NumSharp&version=0.80.0
                    
Install as a Cake Addin
#tool nuget:?package=NumSharp&version=0.80.0
                    
Install as a Cake Tool

NumSharp

NumPy for .NET — a native .NET array library with a NumPy-shaped API: NDArray, broadcasting, slicing views, dtype-aware np.* functions, unmanaged storage, and runtime-generated SIMD kernels. The compatibility target is NumPy 2.x; where behavior differs, NumPy is treated as the source of truth.

NumSharp.Core is 100% managed C# with no native dependency and no P/Invoke — every kernel is its own managed code. An optional OpenBLAS matrix-product backend ships separately as NumSharp.Interop.OpenBLAS.

Install

dotnet add package NumSharp

Quick start

using NumSharp;

var a = np.arange(12).reshape(3, 4);
var window = a[":, 1::2"];

Console.WriteLine(window);
Console.WriteLine(np.sum(window, axis: 0));

For Python readers, the shape is deliberately close:

import numpy as np

a = np.arange(12).reshape(3, 4)
print(a[:, 1::2].sum(axis=0))

Features

  • NumPy-style NDArray — N-dimensional arrays with shape, strides, offsets, slicing, and view semantics (slices return views that share memory).
  • Broadcasting — NumPy-style shape expansion without materializing repeated values.
  • Dtype-aware operations — 15 core dtypes with NumPy-oriented promotion (NEP50) and conversion behavior.
  • Broad np.* surface — creation, manipulation, math, reductions, comparisons, logic, linear algebra, FFT, random sampling, and .npy/.npz I/O.
  • Generated IL + SIMD kernels — runtime-specialized kernels (V128/V256/V512) for supported dtype and layout combinations.

Licensed under the Apache License 2.0.


What's new in 0.80.0

We are at 95.2% NumPy API coverage, and everything except datetime, complex64 and other exotic dtypes matches NumPy byte for byte. This release brings NumPy's text dtypes with numpy.strings and numpy.char, numpy.ma, numpy.polynomial, np.emath and 48 new np.* functions. Integration rather than competition goes on, this time inside .NET: an NDArray now runs through ONNX Runtime models, serves as an ML.NET IDataView and shares its memory with System.Numerics.Tensors.

🧭 Overview

  • NumPy 2.x API coverage around 95.2%, everything except datetime, complex64 and other exotic dtypes is fully supported, with byte-to-byte equality and compatibility to NumPy.
    • Text - NumPy's fixed-width bytes_ (S) and str_ (U) dtypes and NEP 55's variable-width StringDType, with every computation NumPy runs on text, all 46 numpy.strings functions and numpy.char with chararray.
    • np.polynomial.* - the whole numpy.polynomial package, all 193 functions and the six series classes for all six bases, bit-exact.
    • np.* - +48 functions, the ten most used on GitHub: np.hypot, np.histogram, np.logspace, np.gradient, np.vectorize, np.hanning, np.geomspace, np.apply_along_axis, np.trapezoid and np.histogram2d.
    • np.random.* - every NumPy bit generator, the whole Generator distribution surface, and a legacy RandomState that is NumPy's own sampler code line for line, all byte-identical streams.
    • np.ma.* - the masked-array module; np.emath.* - the automatic-domain math module; np.matrix - numpy.matrix as the new NDMatrix type.
  • DType is NumPy's two-level dtype model - NDArray.dtype returns a numpy.dtype-shaped descriptor, with np.dtypes, byte order and datetime64 / timedelta64 descriptors, and NumPy's scalar classes (np.integer, np.floating, np.number, ...) with np.typing.
  • Reductions on NumPy's own schedules - max, min, ptp, nanmax, nanmin, argmax, the flat sum / mean and the fused np.evaluate reductions match NumPy bit for bit, down to the sign of a ±0 tie and a NaN's payload; mean, var, std and their NaN-aware forms are NumPy's own statements; and most of them run faster.
  • NumPy's structure for the engine - every computing np.* function is a TensorEngine member named after its NumPy source file, numpy.linalg and numpy.fft are replaceable sub-engines, and the default engine is settable.
  • The 2026-11-02 parity QA - 53 of its 55 findings fixed on the owner's decisions (one kept as a documented divergence, one deferred), and NumPy's own dot functions behind np.dot / np.vdot / np.vecdot.
  • 86 NumPy-parity, memory-safety and tooling fixes, 40 measured speedups and 44 breaking changes, across the release's 1,670 commits.
  • 3 new NuGet packages - NumSharp.Interop.System.Numerics.Tensors, NumSharp.Interop.OnnxRuntime and NumSharp.Interop.MLNet.
  • 1,119,305 NumPy 2.4.2 oracle test cases (0.70.0: 119,517) and 20,506 test methods (0.70.0: 14,416).

📦 New NuGet Packages

  • NumSharp.Interop.System.Numerics.Tensors - zero-copy interop between NDArray and the BCL's Tensor<T> / TensorSpan<T> (System.Numerics.Tensors), all 15 dtypes.
  • NumSharp.Interop.OnnxRuntime - run ONNX Runtime models on NDArrays, fed from the arrays' own memory, with the outputs read back as NDArrays.
  • NumSharp.Interop.MLNet - an NDArray as an ML.NET IDataView, and a transformer's output column back as an NDArray.

Full NumSharp 0.80.0 release notes

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (33)

Showing the top 5 NuGet packages that depend on NumSharp:

Package Downloads
Microsoft.Quantum.Simulators

Classical simulators of quantum computers for the Q# programming language.

Microsoft.Quantum.Standard

Microsoft's Quantum standard libraries.

Bigtree.Algorithm

Machine Learning library in .NET Core.

Microsoft.Quantum.Standard.Visualization

Provides IQ# visualization support for Microsoft's Q# standard libraries.

KokoroSharp

**Requires an ONNX Runtime package to function. KokoroSharp is an inference engine for Kokoro TTS with ONNX runtime, enabling fast and flexible local text-to-speech (fp/quanted) purely via C#. It features segment streaming, voice mixing, linear job scheduling, and optional playback.

GitHub repositories (12)

Showing the top 12 popular GitHub repositories that depend on NumSharp:

Repository Stars
openutau/OpenUtau
Open singing synthesis platform / Open source UTAU successor
kendryte/nncase
Open deep learning compiler stack for Kendryte AI accelerators ✨
SciSharp/SiaNet
An easy to use C# deep learning library with CUDA/OpenCL support
vocoder712/OpenUtauMobile
OpenUtau Mobile 是一个面向移动端的开源免费歌声合成软件; OpenUtau Mobile is a free and open-source singing voice synthesis software for mobile devices.
microsoft/qsharp-runtime
Runtime components for Q#
Lyrcaxis/KokoroSharp
Fast local TTS inference engine in C# with ONNX runtime. Multi-speaker, multi-platform and multilingual. Integrate on your .NET projects using a plug-and-play NuGet package, complete with all voices.
cassiebreviu/StableDiffusion
Inference Stable Diffusion with C# and ONNX Runtime
microsoft/Microsoft-Rocket-Video-Analytics-Platform
A highly extensible software stack to empower everyone to build practical real-world live video analytics applications for object detection and counting with cutting edge machine learning algorithms.
mobitouchOS/MaIN.NET
NuGet package designed to make LLMs, RAG, and Agents first-class citizens in .NET
SciSharp/Gym.NET
openai/gym's popular toolkit for developing and comparing reinforcement learning algorithms port to C#.
georg-jung/FaceAiSharp
State-of-the-art face detection and face recognition for .NET.
Blackwood416/AstraTTS
A high-performance, cross-platform TTS synthesis solution powered by ONNX Runtime, featuring support for streaming output and low-latency playback, as well as custom voice profiles and mixed Chinese-English generation. 基于 ONNX Runtime 的跨平台高性能 TTS 合成方案,支持流式输出与低延迟播放,支持自定义音色与中英混合生成。
Version Downloads Last Updated
0.80.0 0 11/8/2026
0.70.0 10,805 9/6/2026
0.60.0 9,624 6/28/2026
0.50.0-prerelease 245 4/12/2026
0.41.0-prerelease 233 3/23/2026
0.40.0-prerelease 184 7/19/2026
0.30.0 4,240,154 2/14/2021
0.20.5 797,744 12/31/2019
0.20.4 360,651 10/5/2019
0.20.3 4,232 9/28/2019
0.20.2 3,020 9/11/2019
0.20.1 19,958 9/1/2019
0.20.0 4,982 8/20/2019
0.10.6 28,626 7/24/2019
Loading failed