Closed
Description
Hello team. While working with the library I wanted to pass out a PyArray from a function but I am unable to convert a ndarray into a PyArray the following is the error code:
mismatched types
expected struct `ndarray::ArrayBase`, found a different struct `ndarray::ArrayBase`
note: expected struct `ndarray::ArrayBase<ndarray::data_repr::OwnedRepr<_>, _>`
found struct `ndarray::ArrayBase<ndarray::OwnedRepr<i32>, ndarray::Dim<[usize; 2]>>`
note: perhaps two different versions of crate `ndarray` are being used?rustc(E0308)
lib.rs(76, 58): expected struct `ndarray::ArrayBase`, found a different struct `ndarray::ArrayBase`
yielded from the simple code
let mut return_arr = Array2::<i32>::zeros((10, 10));
let return_Second_ = PyArray::from_owned_array(_py , return_arr);
I was not able to find in ndarray documentation the type:
ndarray::ArrayBase<ndarray::data_repr::OwnedRepr<_>, _>
Metadata
Metadata
Assignees
Labels
No labels