File tree 3 files changed +9
-6
lines changed
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -13,4 +13,8 @@ license-file = "LICENSE"
13
13
libc = " 0.2"
14
14
num-complex = " 0.1"
15
15
ndarray = " 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::*;
14
14
/// Untyped safe interface for NumPy ndarray.
15
15
pub struct PyArray ( PyObject ) ;
16
16
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 ) ;
22
18
23
19
impl PyArray {
24
20
pub fn as_array_ptr ( & self ) -> * mut npyffi:: PyArrayObject {
Original file line number Diff line number Diff line change
1
+ #![ feature( specialization) ]
2
+
1
3
extern crate libc;
2
4
extern crate ndarray;
3
5
extern crate num_complex;
6
+ #[ macro_use]
4
7
extern crate pyo3;
5
8
6
9
pub mod array;
You can’t perform that action at this time.
0 commit comments