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

Method into_readonly

src/array.rs:995–1001  ·  view source on GitHub ↗

Consume `self` into an immutable borrow of the NumPy array # Panics Panics if the allocation backing the array is currently mutably borrowed. For a non-panicking variant, use [`try_into_readonly`][Self::try_into_readonly].

(self)

Source from the content-addressed store, hash-verified

993 ///
994 /// For a non-panicking variant, use [`try_into_readonly`][Self::try_into_readonly].
995 fn into_readonly(self) -> PyReadonlyArray<'py, T, D>
996 where
997 T: Element,
998 D: Dimension,
999 {
1000 self.try_into_readonly().unwrap()
1001 }
1002
1003 /// Get an immutable borrow of the NumPy array
1004 ///

Callers 1

multiple_shared_borrowsFunction · 0.80

Implementers 1

array.rssrc/array.rs

Calls 1

try_into_readonlyMethod · 0.80

Tested by 1

multiple_shared_borrowsFunction · 0.64