Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 650 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 650 Bytes

simple extension

Here, we use maturin for building Python wheels and nox for managing Python dependencies and virtualenvs.

Running nox inside this directory creates a virtualenv, installs Python dependencies and the extension into it and executes the tests from tests/test_exp.py.

By running

maturin develop

from inside a virtualenv, you can use the extension from the Python REPL:

>>> import numpy as np
>>> import rust_ext
>>> rust_ext.axpy(2.0, np.array([0.0, 1.0]), np.array([2.0, 3.0]))
array([2., 5.])