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

Method into_readwrite

src/array.rs:1040–1046  ·  view source on GitHub ↗

Consume `self` into an mutable borrow of the NumPy array # Panics Panics if the allocation backing the array is currently borrowed or if the array is [flagged as][flags] not writeable. For a non-panicking variant, use [`try_into_readwrite`][Self::try_into_readwrite]. [flags]: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flags.html

(self)

Source from the content-addressed store, hash-verified

1038 ///
1039 /// [flags]: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flags.html
1040 fn into_readwrite(self) -> PyReadwriteArray<'py, T, D>
1041 where
1042 T: Element,
1043 D: Dimension,
1044 {
1045 self.try_into_readwrite().unwrap()
1046 }
1047
1048 /// Get a mutable borrow of the NumPy array
1049 ///

Implementers 1

array.rssrc/array.rs

Calls 1

try_into_readwriteMethod · 0.80