NumSharp is a native .NET NumPy whose own test command filters two categories out
High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
At a glance
- What is it?
- NumSharp gives C# and F# a NumPy-shaped array API backed by runtime IL generation and SIMD, and the documentation is precise about where that stops: partial porting coverage, a conditional fast path, and a documented test run that excludes two named categories.
- Who is it for?
- Treat NumSharp as a native .NET library with a NumPy-shaped surface, not as a finished NumPy port: the coverage explorer is the honest measure of what exists, and if your code reaches for a function the dashboard shows as planned, budget for writing it yourself or for the CPython bridge in Numpy.NET.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 16, 2026, and from our analysis. They are not legal advice.
Star history
- SciSharp/NumSharp1,483 ★ · +4
| Repository | 2026-09-11 | 2026-11-16 |
|---|---|---|
| SciSharp/NumSharp | 1.5k | 1.5k |
4 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The documented test run skips OpenBugs and HighMemory
The unit test command in the README is not the whole suite. It carries a filter that excludes two named categories, OpenBugs and HighMemory, so any test tagged as a known bug or as memory hungry stays out of what is described as the normal CI-style filter.
dotnet test test/NumSharp.Tests/NumSharp.Tests.csproj \
--configuration Release \
--no-build \
--framework net8.0 \
--filter "TestCategory!=OpenBugs&TestCategory!=HighMemory"The command passes --no-build, so it expects the Release build from the preceding step, which is `dotnet build test/NumSharp.Tests/NumSharp.Tests.csproj --configuration Release`. What the exclusion removes is named but never counted: nothing states how many tests sit in either category, and nothing explains what OpenBugs covers beyond the name. A green run is therefore a statement about the remaining tests rather than about the library. Note also that the pinned framework is net8.0 while CI covers net8.0 and net10.0, so the local command does not exercise the newer target on its own.
NumPy is the tiebreaker and the comparison pins 2.4.2
The stated compatibility target is NumPy 2.x, and the rule for disagreements is given without hedging: when NumSharp behavior and NumPy behavior differ, NumPy is treated as the source of truth and NumPy aligns. That is a policy for settling conflicts rather than a promise that behavior matches, and the policy has a cost for anyone pinning a dependency, since matching a moving target means a NumSharp release can change results to agree with a NumPy release you are not running. The performance snapshot makes one concrete version visible. The latest checked-in benchmark compares NumSharp with NumPy 2.4.2, so the dashboard numbers are anchored to a single 2.x point release rather than to 2.x in general, and the comparison spans the operation matrix, the supported dtypes, three size tiers, and the NDIter, layout, operand, cast and fusion subsystems.
Porting coverage is presented as a roadmap to 100%, not a finished port
Completeness is handled by a dashboard rather than by a claim. The coverage and support page is introduced as the full implementation roadmap to complete 100% NumPy porting, with an explorer for checking individual functions, which puts the unfinished work on display as the plan. The same acknowledgement appears where it bites, in the related projects section, where the route for needing the full CPython NumPy runtime, including Python extension modules NumSharp does not implement, goes to Numpy.NET in the same SciSharp organization. The division is architectural rather than a preference: NumSharp is a native .NET implementation with a NumPy-shaped API, while Numpy.NET bridges into Python. For C# and F# code that never touches an extension module, that keeps the interpreter out of the process; for code that does, the two are not interchangeable and the boundary falls on one side of it or the other.
Generated kernels apply only where layout and dtype allow
The speed story is conditional by design, and the conditions are written down. Runtime IL generation and SIMD fast paths apply where layout and dtype allow it, so the accelerated path is selected per call rather than guaranteed per function. The dtype story is bounded too: fifteen core dtypes with NumPy-oriented promotion and conversion behavior, and no enumeration of which fifteen appears anywhere in the text. Two execution mechanisms sit underneath the API. NDIter-style iteration provides the execution model, and fused np.evaluate expressions exist to cut intermediate allocations, which matters when a chain of elementwise operations would otherwise materialize one array per step. Storage underneath is unmanaged, and arrays carry shape, stride, offset and view metadata so that slicing can hand back a view rather than a copy, with broadcasting expanding shapes without materializing repeated values.
The faster-than-NumPy claim carries no figure anywhere in the text
The performance claim is qualified in the very sentence that makes it. The edge is said to lead to a higher performance mark than NumPy on many functions, with the benchmark dashboard linked as the evidence, and on many functions is doing real work: it is neither a per-call guarantee nor a stated average. What supports the claim is process rather than a headline number. Benchmarks are described as tracked release snapshots instead of ad hoc numbers, checked in per release, and the latest one compares against NumPy 2.4.2 across the operation matrix, three size tiers and five named subsystems. That is a stronger practice than a single timing table, but the text carries no speedup ratio at any size, no operation list and no threshold, so the claim cannot be weighed from the documentation and the dashboard is the only place it can be checked.
The C# and Python listings differ in two lines
The same program is offered twice, once in C# and once in Python, with a note that the shape is deliberately close to what a NumPy user would write. Two lines differ regardless. Indexing in C# goes through a string, `var window = a[":, 1::2"];`, where the Python listing writes `window = a[:, 1::2]` as an expression, so the string carries the slice that Python writes inline. And the C# listing prints the window on its own line before the axis 0 sum, while the Python listing prints only window.sum(axis=0), so the two do not print the same thing.
dotnet add package NumSharpInstallation is that one command, and the sample opens with `using NumSharp;` and builds its array from `np.arange(12).reshape(3, 4)`, which is the entire setup: one import, one array, one slice, one reduction.
The root carries agent config, a signing key and reference submodules the text never names
The repository holds considerably more than the README leads with. At the root sit ARCHITECTURE.md, AGENTS.md, .agents/, .claude/, global.json, .gitmodules, a refs/ directory, a coverage/ directory, a benchmark/ directory, a tools/ directory, and a file called Open.snk. The architecture document is never linked from the README, neither are the agent directories, and signing is not mentioned at all, so anyone working from the documentation alone would not know any of them are there. global.json is the file that pins the SDK a build resolves against, and no SDK version appears in the instructions, which cover only the .NET side of the toolchain. refs/ sitting next to .gitmodules is the shape of a repository that pulls reference code in as submodules, and the build and test steps never mention them at all.
Two stable tags bracket a prerelease named for long indexing
The recent tags carry their own release names, and they are not the same kind of thing. v0.70.0 is labeled a stable release and dates from early September 2026, v0.60.0 is another stable release from late June, and between them sits v0.50.0-prerelease from April, named for long indexing. That name lines up with the string indexer in the example and with the view semantics the array type is built around, so indexing is treated as the feature work rather than as an afterthought. The version number itself is the part to watch: a project calling 0.70.0 a stable release is telling you the shape of the API is settled, not that the surface is complete, which both the roadmap to 100% porting and the pointer to Numpy.NET confirm. The default branch is master.
Editorial conclusion
Treat NumSharp as a native .NET library with a NumPy-shaped surface, not as a finished NumPy port: the coverage explorer is the honest measure of what exists, and if your code reaches for a function the dashboard shows as planned, budget for writing it yourself or for the CPython bridge in Numpy.NET. Before you rely on the fast path, confirm that your dtype and layout land among the fifteen core dtypes and the cases the SIMD path accepts, since the speed claim is qualified as holding on many functions and no figure appears in the text. And treat a green unit test run as partial: the command that mirrors CI leaves the OpenBugs and HighMemory categories out on purpose.
Frequently asked questions
How do I install NumSharp in a .NET project?
One command: `dotnet add package NumSharp`. The package is published on NuGet, and the README names no other installation route, no source build step and no manual package reference.
Does NumSharp need Python installed at runtime?
No. NumSharp is a native .NET array library, so C# and F# code uses a NumPy-shaped model without embedding CPython. Calling the full CPython NumPy runtime, including Python extension modules NumSharp does not implement, is what Numpy.NET in the same SciSharp organization is for.
Is NumSharp a complete port of NumPy?
Not presented as one. The coverage and support dashboard is introduced as the implementation roadmap to complete 100% NumPy porting, and the supported dtype set is fifteen core dtypes rather than an open list.
How does NumSharp compare with NumPy on speed?
The README claims a higher performance mark than NumPy on many functions and links the benchmark dashboard for evidence, but prints no speedup figure itself. The latest checked-in snapshot compares against NumPy 2.4.2 across three size tiers.
Which .NET versions does NumSharp cover in CI?
CI runs on Windows, Linux and macOS for net8.0 and net10.0. The unit test command in the README pins --framework net8.0, so a local run does not exercise net10.0 on its own.
What does the normal NumSharp test run leave out?
The filter excludes two categories, TestCategory!=OpenBugs and TestCategory!=HighMemory, so tests tagged as known bugs or as high memory are not part of the documented CI-style run, and no count of either category is given.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/scisharp-numsharp)Star history chart for your README
[](https://hysenlabs.com/projects/scisharp-numsharp)Was this useful?