NumSharp 0.20.0
See the version list below for details.
dotnet add package NumSharp --version 0.20.0
NuGet\Install-Package NumSharp -Version 0.20.0
<PackageReference Include="NumSharp" Version="0.20.0" />
paket add NumSharp --version 0.20.0
#r "nuget: NumSharp, 0.20.0"
// Install NumSharp as a Cake Addin #addin nuget:?package=NumSharp&version=0.20.0 // Install NumSharp as a Cake Tool #tool nuget:?package=NumSharp&version=0.20.0
NumSharp
NumPy port in C# .NET Standard<a href="http://scisharpstack.org"><img src="https://github.com/SciSharp/SciSharp/blob/master/art/scisharp_badge.png" width="200" height="200" align="right" /></a>
Is it difficult to translate python machine learning code into C#? Because too many functions can’t be found in the corresponding code in the .Net SDK. NumSharp is the C# version of NumPy, which is as consistent as possible with the NumPy programming interface, including function names and parameter locations. By introducing the NumSharp tool library, you can easily convert from python code to C# code. Here is a comparison code between NumSharp and NumPy (left is python, right is C#):
If you want to read some more informations, we start a doc on https://scisharp.github.io/NumSharp/.
NumSharp has implemented the arange, array, max, min, reshape, normalize, unique interfaces. More and more interfaces will be added to the library gradually. If you want to use .NET to get started with machine learning, NumSharp will be your best tool library.
Implemented APIs
The NumPy class is a high-level abstraction of NDArray that allows NumSharp to be used in the same way as Python's NumPy, minimizing API differences caused by programming language features, allowing .NET developers to maximize Utilize a wide range of NumPy code resources to seamlessly translate python code into .NET code.
Check the code: src\NumSharp.Core\APIs
How to use
using NumSharp;
// create a vector
var nd = np.arange(12)
// create a matrix
nd = np.arange(12).reshape(3, 4);
// access data by index
var data = nd[1, 1];
// create a tensor
nd = np.arange(12).reshape(2, 3, 2);
// get the 2nd vector in the 1st dimension
data = n[new Shape(1)];
// get the 3rd vector in the (axis 1, axis 2) dimension
data = n[new Shape(1, 2)];
// interate ndarray
foreach (data in nd)
{
// data is a ndarray or a value
}
Install NumSharp in NuGet
PM> Install-Package NumSharp
How to make docs
- Download docfx and put on PATH → https://github.com/dotnet/docfx/releases
docfx ./docfx_project/docfx.json -o ./docs
How to run benchmark
C: \> dotnet NumSharp.Benchmark.dll nparange
Reference the documents generated by DocFX.
Reference the documents host on readthedocs.io.
NumSharp is referenced by:
You might also be interested in NumSharp's sister project Numpy.NET.
NumSharp is a member project of SciSharp.org which is the .NET based ecosystem of open-source software for mathematics, science, and engineering. Welcome to fork and pull request to add more APIs, and make reference list longer.
<img src="https://avatars3.githubusercontent.com/u/44989469?s=200&v=4" width="80">
Join us on Gitter
Scan QR code to join TIM group:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Memory (>= 4.5.3)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
NuGet packages (22)
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. |
|
FaceAiSharp
FaceAiSharp allows you to work with face-related computer vision tasks easily. It currently provides face detection, face recognition, facial landmarks detection, and eye state detection functionalities. FaceAiSharp leverages publicly available pretrained ONNX models to deliver accurate and efficient results and offers a convenient way to integrate them into your .NET applications. Whether you need to find faces, recognize individuals, detect facial landmarks, or determine eye states, FaceAiSharp simplifies the process with its simple API. ONNXRuntime is used for model inference, enabling hardware acceleration were possible. All processing is done locally, with no reliance on cloud services. This package contains just FaceAiSharp's managed code and does not include any ONNX models. Take a look at FaceAiSharp.Bundle for a batteries-included package with everything you need to get started. |
|
FaceAiSharp.Bundle
FaceAiSharp allows you to work with face-related computer vision tasks easily. It currently provides face detection, face recognition, facial landmarks detection, and eye state detection functionalities. FaceAiSharp leverages publicly available pretrained ONNX models to deliver accurate and efficient results and offers a convenient way to integrate them into your .NET applications. Whether you need to find faces, recognize individuals, detect facial landmarks, or determine eye states, FaceAiSharp simplifies the process with its simple API. ONNXRuntime is used for model inference, enabling hardware acceleration were possible. All processing is done locally, with no reliance on cloud services. This is a bundle package that installs FaceAiSharp's managed code and multiple AI models in the ONNX format. |
GitHub repositories (9)
Showing the top 5 popular GitHub repositories that depend on NumSharp:
Repository | Stars |
---|---|
stakira/OpenUtau
Open singing synthesis platform / Open source UTAU successor
|
|
SciSharp/NumSharp
High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
|
|
kendryte/nncase
Open deep learning compiler stack for Kendryte AI accelerators ✨
|
|
microsoft/ai-dev-gallery
An open-source project for Windows developers to learn how to add AI with local models and APIs to Windows apps.
|
|
SciSharp/SiaNet
An easy to use C# deep learning library with CUDA/OpenCL support
|
Version | Downloads | Last updated |
---|---|---|
0.30.0 | 757,957 | 2/14/2021 |
0.20.5 | 725,689 | 12/31/2019 |
0.20.4 | 335,228 | 10/5/2019 |
0.20.3 | 3,574 | 9/28/2019 |
0.20.2 | 2,447 | 9/11/2019 |
0.20.1 | 18,225 | 9/1/2019 |
0.20.0 | 3,800 | 8/20/2019 |
0.10.6 | 26,962 | 7/24/2019 |
0.10.5 | 2,641 | 7/22/2019 |
0.10.4 | 2,485 | 7/18/2019 |
0.10.3 | 12,449 | 6/15/2019 |
0.10.2 | 2,160 | 5/25/2019 |
0.10.1 | 3,678 | 5/11/2019 |
0.10.0 | 2,427 | 5/5/2019 |
0.9.0 | 3,447 | 4/15/2019 |
0.8.3 | 2,020 | 3/29/2019 |
0.8.2 | 2,769 | 3/25/2019 |
0.8.1 | 2,189 | 3/22/2019 |
0.8.0 | 2,313 | 3/12/2019 |
0.7.4 | 1,880 | 3/7/2019 |
0.7.3 | 552,216 | 2/20/2019 |
0.7.2 | 2,367 | 2/18/2019 |
0.7.1 | 2,401 | 2/12/2019 |
0.7.0 | 1,951 | 1/28/2019 |
0.6.6 | 2,357 | 1/26/2019 |
0.6.5 | 2,389 | 1/11/2019 |
0.6.4 | 2,393 | 1/7/2019 |
0.6.3 | 1,899 | 12/30/2018 |
0.6.2 | 5,945 | 12/27/2018 |
0.6.1 | 1,903 | 12/26/2018 |
0.6.0 | 1,976 | 12/21/2018 |
0.5.0 | 1,946 | 12/5/2018 |
0.4.0 | 1,898 | 11/21/2018 |
0.3.0 | 1,872 | 11/7/2018 |
0.2.0 | 3,995 | 10/29/2018 |
0.1.0 | 2,168 | 10/10/2018 |
Most of the library (>95%) has been rewritten within over 400 commits in course of 3 months.
- Full n-d, slice, broadcasting and axis support in all reimplemented methods (e.g. np.sum, np.concatenate) Broadcasting n-d shapes against each other.
- NDArray Slicing and nested slicing (nd["-1, ::2"]["1::3, :, 0"])
- Full and precise (to numpy) type resolving and conversion (upcasting, downcasting and all other cases)
- Use of unmanaged memory and unsafe code in favor of performance.
- NumSharp no longer perform copies except for cases when numpy does. Compared to previous version, indexing an n-d array (e.g. nd[0,1] when shape is (3,3,3,3)) would return a copy when now it returns a reference (alias).