File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,4 +13,8 @@ license-file = "LICENSE"
1313libc = " 0.2"
1414num-complex = " 0.1"
1515ndarray = " 0.10"
16- pyo3 = " 0.2"
16+
17+ [dependencies .pyo3 ]
18+ git = " http://github.com/termoshtt/pyo3"
19+ branch = " pyobject_macros"
20+ version = " 0.2"
Original file line number Diff line number Diff line change @@ -14,11 +14,7 @@ use super::*;
1414/// Untyped safe interface for NumPy ndarray.
1515pub struct PyArray ( PyObject ) ;
1616
17- impl ToPyPointer for PyArray {
18- fn as_ptr ( & self ) -> * mut ffi:: PyObject {
19- self . 0 . as_ptr ( )
20- }
21- }
17+ pyobject_native_type ! ( PyArray , npyffi:: PyArray_Type , npyffi:: PyArray_Check ) ;
2218
2319impl PyArray {
2420 pub fn as_array_ptr ( & self ) -> * mut npyffi:: PyArrayObject {
Original file line number Diff line number Diff line change 1+ #![ feature( specialization) ]
2+
13extern crate libc;
24extern crate ndarray;
35extern crate num_complex;
6+ #[ macro_use]
47extern crate pyo3;
58
69pub mod array;
You can’t perform that action at this time.
0 commit comments