1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! `rust-numpy` provides Rust interfaces for [NumPy C APIs](https://docs.scipy.org/doc/numpy/reference/c-api.html),
//! especially for [ndarray](https://www.numpy.org/devdocs/reference/arrays.ndarray.html) class.
//!
//! It uses [pyo3](https://github.com/PyO3/pyo3) for rust bindings to cpython, and uses
//! [ndarray](https://github.com/bluss/ndarray) for rust side matrix library.
//!
//! For numpy dependency, it calls `import numpy.core` internally. So you just need numpy
//! installed by `pip install numpy` or other ways in your python environment.
//! You can use both system environment and `virtualenv`.
//!
//! # Example
//!
//! ```
//! #[macro_use]
//! extern crate ndarray;
//! extern crate numpy;
//! #[macro_use]
//! extern crate pyo3;
//! use pyo3::prelude::*;
//! use numpy::*;
//! fn main() {
//! let gil = Python::acquire_gil();
//! let py = gil.python();
//! let np = PyArrayModule::import(py).unwrap();
//! let py_array = array![[1i64, 2], [3, 4]].into_pyarray(py, &np);
//! assert_eq!(
//! py_array.as_array().unwrap(),
//! array![[1i64, 2], [3, 4]].into_dyn(),
//! );
//! }
//! ```
extern crate cfg_if;
extern crate libc;
extern crate ndarray;
extern crate num_complex;
extern crate pyo3;
pub use PyArray;
pub use IntoPyArray;
pub use *;
pub use ;
pub use *;