Skip to content

Commit 745fc05

Browse files
committed
Make it work with the latest ndarray
1 parent a11ca3b commit 745fc05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cfg-if = "0.1"
1414
libc = "0.2"
1515
num-complex = "0.2"
1616
num-traits = "0.2"
17-
ndarray = "0.12"
17+
ndarray = ">=0.12"
1818
pyo3 = "0.8"
1919

2020
[features]

src/array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl<T: TypeNum, D: Dimension> PyArray<T, D> {
414414
/// # #[macro_use] extern crate ndarray; fn main() {
415415
/// use numpy::PyArray2;
416416
/// let gil = pyo3::Python::acquire_gil();
417-
/// let pyarray = PyArray2::zeros(gil.python(), [2, 2], false);
417+
/// let pyarray: &PyArray2<usize> = PyArray2::zeros(gil.python(), [2, 2], false);
418418
/// assert_eq!(pyarray.as_array(), array![[0, 0], [0, 0]]);
419419
/// # }
420420
/// ```

0 commit comments

Comments
 (0)