rust-numpy

Build Status Crate docs.rs

Rust binding of NumPy C-API

Example

Please see example directory for a complete example

```rust

[macro_use]

extern crate cpython; extern crate numpy;

use numpy::*; use cpython::{PyResult, Python};

pymoduleinitializer!(rustext, initrustext, PyInitrustext, |py, m| { m.add(py, "doc", "Rust extension for NumPy")?; m.add(py, "getarr", pyfn!(py, getarr_py()))?; Ok(()) });

fn getarrpy(py: Python) -> PyResult { let np = PyArrayModule::import(py)?; let arr = PyArray::zeros::(py, &np, &[3, 5], NPY_CORDER); Ok(arr) } ```

Contribution

This project is in pre-alpha version. We need your feedback. Don't hesitate to open issue!

Version