Skip to content

Commit 713d24f

Browse files
committed
Update pyo3 to 0.8
1 parent 37cf48b commit 713d24f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ libc = "0.2"
1515
num-complex = "0.2"
1616
num-traits = "0.2"
1717
ndarray = "0.12"
18-
pyo3 = "0.7"
18+
pyo3 = {git = "https://github.com/PyO3/pyo3"}
1919

2020
[features]
2121
# In default setting, python version is automatically detected

src/array.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pub fn get_array_module(py: Python<'_>) -> PyResult<&PyModule> {
102102
pyobject_native_type_convert!(
103103
PyArray<T, D>,
104104
*npyffi::PY_ARRAY_API.get_type_object(npyffi::ArrayType::PyArray_Type),
105+
Some("numpy"),
105106
npyffi::PyArray_Check,
106107
T, D
107108
);
@@ -133,8 +134,8 @@ impl<'a, T: TypeNum, D: Dimension> FromPyObject<'a> for &'a PyArray<T, D> {
133134
}
134135
}
135136

136-
impl<T, D> IntoPyObject for PyArray<T, D> {
137-
fn into_object(self, _py: Python<'_>) -> PyObject {
137+
impl<T, D> IntoPy<PyObject> for PyArray<T, D> {
138+
fn into_py(self, _py: Python<'_>) -> PyObject {
138139
self.0
139140
}
140141
}

src/slice_box.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ impl<T> type_object::PyTypeInfo for SliceBox<T> {
2929
type Type = ();
3030
type BaseType = PyAny;
3131
const NAME: &'static str = "SliceBox";
32+
const MODULE: Option<&'static str> = Some("_rust_numpy");
3233
const DESCRIPTION: &'static str = "Memory store for PyArray using rust's Box<[T]>.";
3334
const FLAGS: usize = 0;
3435
const SIZE: usize = std::mem::size_of::<Self>();

0 commit comments

Comments
 (0)