Skip to main content

Python modules for Monte Carlo integration

Project description

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 (x,y,z): sqrt(x**2+y**2+z**2),
...     npoints=1e6, xl=[0.,0.,0.], xu=[1.,1.,1.])
>>> print "{} +/- {}".format(result,error)
0.960695982212 +/- 0.000277843266684

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-monaco-0.1.1.tar.gz (1.8 MB view details)

Uploaded Source

File details

Details for the file scikit-monaco-0.1.1.tar.gz.

File metadata

  • Download URL: scikit-monaco-0.1.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scikit-monaco-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6d232663e789b3e81cbaaff078a4b7325be01955cf292afae865c1d4bce0d5a6
MD5 c22bf9888bdd3dc41d7134f953fc6d7c
BLAKE2b-256 5a55edac009874cfc505663f0fb41830c1145c52190018216bd38ddcece9d5be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page