-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ extern crate libc; | |
extern crate python3_sys as pyffi; | ||
|
||
pub mod pyarray; | ||
pub mod pyarrayiter; | ||
pub mod pyufunc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#![allow(non_camel_case_types)] | ||
// FIXME ^ should be removed | ||
|
||
use pyffi::*; | ||
use super::pyarray::*; | ||
|
||
pub type npy_bool = ::std::os::raw::c_uchar; | ||
pub type npy_iter_get_dataptr_t = | ||
::std::option::Option<unsafe extern "C" fn(iter: *mut PyArrayIterObject, | ||
arg1: *mut npy_intp) | ||
-> *mut ::std::os::raw::c_char>; | ||
|
||
#[repr(C)] | ||
#[derive(Clone, Copy)] | ||
pub struct PyArrayIterObject { | ||
pub ob_base: PyObject, | ||
pub nd_m1: ::std::os::raw::c_int, | ||
pub index: npy_intp, | ||
pub size: npy_intp, | ||
pub coordinates: [npy_intp; 32usize], | ||
pub dims_m1: [npy_intp; 32usize], | ||
pub strides: [npy_intp; 32usize], | ||
pub backstrides: [npy_intp; 32usize], | ||
pub factors: [npy_intp; 32usize], | ||
pub ao: *mut PyArrayObject, | ||
pub dataptr: *mut ::std::os::raw::c_char, | ||
pub contiguous: npy_bool, | ||
pub bounds: [[npy_intp; 2usize]; 32usize], | ||
pub limits: [[npy_intp; 2usize]; 32usize], | ||
pub limits_sizes: [npy_intp; 32usize], | ||
pub translate: npy_iter_get_dataptr_t, | ||
} |