diff --git a/examples/parallel/Cargo.toml b/examples/parallel/Cargo.toml index e05f2e6b3..d20d8bd29 100644 --- a/examples/parallel/Cargo.toml +++ b/examples/parallel/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] pyo3 = { version = "0.21.0", features = ["extension-module", "multiple-pymethods"] } numpy = { path = "../.." } -ndarray = { version = "0.15", features = ["rayon", "blas"] } +ndarray = { version = "0.16", features = ["rayon", "blas"] } blas-src = { version = "0.8", features = ["openblas"] } openblas-src = { version = "0.10", features = ["cblas", "system"] } diff --git a/examples/simple/src/lib.rs b/examples/simple/src/lib.rs index 33c61557a..a2cbbe7f8 100644 --- a/examples/simple/src/lib.rs +++ b/examples/simple/src/lib.rs @@ -107,7 +107,7 @@ fn rust_ext<'py>(m: &Bound<'py, PyModule>) -> PyResult<()> { #[allow(deprecated)] Zip::from(x.as_array_mut()) .and(y.as_array()) - .apply(|x, y| *x = (i64::from(*x) + 60 * i64::from(*y)).into()); + .for_each(|x, y| *x = (i64::from(*x) + 60 * i64::from(*y)).into()); } // This crate follows a strongly-typed approach to wrapping NumPy arrays