Git Product home page Git Product logo

numsharp's Introduction

NumSharp

NumPy port in C# .NET Standard

Join the chat at https://gitter.im/publiclab/publiclab AppVeyor codecov NuGet Badge

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#):

comparision

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

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:

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.

Star me on Github if you like it.

Scan QR code to join TIM group:

SciSharp STACK

numsharp's People

Contributors

aoaaquarius avatar dania-vera avatar dotchris90 avatar emrahsungu avatar esther2013 avatar fdncred avatar hanabi1224 avatar henon avatar huazhikui avatar katdti avatar kevinma0207 avatar oceania2018 avatar pppbr avatar vunb avatar yamachu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.