GithubHelp home page GithubHelp logo

pbugnion / scikit-monaco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scikit-monaco/scikit-monaco

0.0 2.0 0.0 2.01 MB

Python routines for Monte Carlo integration

License: Other

Python 7.50% C 92.31% TeX 0.19%

scikit-monaco's Introduction

scikit-monaco

scikit-monaco is a library for Monte Carlo integration in python. The core is written in Cython, with process-level parallelism to squeeze the last bits of speed out of the python interpreter.

A code snippet is worth a thousand words. Let's look at integrating sqrt(x**2 + y**2 + z**2) in the unit square:

>>> from skmonaco import mcquad
>>> from math import sqrt
>>> result, error = mcquad(
...     lambda xs: sqrt(xs[0]**2+xs[1]**2+xs[2]**2),
...     npoints=1e6, xl=[0.,0.,0.], xu=[1.,1.,1.])
>>> print "{} +/- {}".format(result,error)
0.960695982212 +/- 0.000277843266684

Links

Installation

From Pypi

The easiest way to download and install scikit-monaco is from the Python package index (pypi). Just run:

$ python easy_install scikit-monaco

Or, if you have pip:

$ pip install scikit-monaco

From source

Clone the repository using:

$ git clone https://github.com/scikit-monaco/scikit-monaco.git

And run:

$ python setup.py install

in the project's root directory.

Testing

After the installation, run $ python runtests.py in the package's root directory.

Issue reporting and contributing

Report issues using the github issue tracker.

Read the CONTRIBUTING guide to learn how to contribute.

scikit-monaco's People

Contributors

pbugnion 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.