We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ToPyArray
py_clone
clone
1 parent f291cf2 commit db1a1a3Copy full SHA for db1a1a3
src/convert.rs
@@ -195,7 +195,7 @@ where
195
let array = PyArray::<A, _>::new_bound(py, dim, false);
196
let mut data_ptr = array.data();
197
for item in self.iter() {
198
- data_ptr.write(item.clone());
+ data_ptr.write(item.py_clone(py));
199
data_ptr = data_ptr.add(1);
200
}
201
array
@@ -228,7 +228,7 @@ where
228
ptr::copy_nonoverlapping(self.data.ptr(), data_ptr, self.len());
229
} else {
230
231
232
233
234
0 commit comments