Giter VIP home page Giter VIP logo

mathnetwrapper's Introduction

mathnetwrapper

A thin (iron) python wrapper for MathNet.Numerics

Usage:

Full MathNet.Numerics namespace available as MN

Example:

Make a random 2x2 Matrix

import mathnetwrapper as mnw

x = mnw.matrix((2, 2), distribution=mnw.MN.Distributions.Normal())

print x
DenseMatrix 2x2-Double
 0.308277 -0.47732
-0.0486687 1.38952

Make matrix from python list-of-lists, multiply by something random

a = [1, 2, 3, 4]
b = [a, a[::-1]]

c = mnw.matrix((2, 4), input_list=mnw.list_transpose_stack(b))

d = mnw.matrix((4, 3), distribution=mnw.MN.Distributions.Cauchy())

print c, d
DenseMatrix 2x4-Double
1 2 3 4
4 3 2 1

DenseMatrix 4x3-Double
-0.310471 0.287797 -0.704258
0.0676569 0.588943 -1.3042
 -3.50351 0.408381 2.23867
 3.62503 -1.40826 -0.569192
e = c.Multiply(d)  # c is .NET class, use DenseMatrix method .Multiply()

print e
DenseMatrix 2x3-Double
 3.81443 -2.94222 1.12658
-4.42091 2.32652 -2.82149

More to come...

mathnetwrapper's People

Contributors

tymokvo avatar

Stargazers

 avatar Ivelin Peychev avatar Ehsan Iran-Nejad avatar

Watchers

James Cloos avatar  avatar

mathnetwrapper's Issues

there have any more functions?

thanks for your great job,there have any more functions can help us to use MathNet on Python? or how to expand mathnetwrapper by me?

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.