# Pi nach Montecarlo Calculate Pi with the montecarlo method (random sampling). ## Build the Python .wheel The command `maturin build` outputs the wheel into ./target/wheels/*.wheel ## Use the module in Python Create a virtual python environment: `python -m venv venv`. Activate the virtual environment: `. ./venv/bin/activate`. Install the package: `maturin develop`. ```python from rs_montecarlo import montecarlo a = montecarlo(1_000_000) ``` ## Benchmarks A python benchmark can be found in ./benchmark.py ``` rust_time = 0.8316118060611188 python_time = 3.7102814669488 Rust version is: 4.46 times faster ```