MCPcopy Create free account
hub / github.com/PyO3/rust-numpy / to_vec

Method to_vec

src/array.rs:1523–1530  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1521 }
1522
1523 fn to_vec(&self) -> Result<Vec<T>, AsSliceError>
1524 where
1525 T: Element,
1526 D: Dimension,
1527 {
1528 let slice = unsafe { self.as_slice() };
1529 slice.map(|slc| T::vec_from_slice(self.py(), slc))
1530 }
1531
1532 fn try_into_readonly(self) -> Result<PyReadonlyArray<'py, T, D>, BorrowError>
1533 where

Callers 2

to_pyarray_arrayFunction · 0.80
into_pyarray_arrayFunction · 0.80

Calls 1

as_sliceMethod · 0.45

Tested by 2

to_pyarray_arrayFunction · 0.64
into_pyarray_arrayFunction · 0.64