MCPcopy Index your code
hub / github.com/PyO3/rust-numpy / readwrite

Method readwrite

src/array.rs:1058–1064  ·  view source on GitHub ↗

Get a 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_readwrite`][Self::try_readwrite]. [flags]: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flags.html

(&self)

Source from the content-addressed store, hash-verified

1056 ///
1057 /// [flags]: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flags.html
1058 fn readwrite(&self) -> PyReadwriteArray<'py, T, D>
1059 where
1060 T: Element,
1061 D: Dimension,
1062 {
1063 self.try_readwrite().unwrap()
1064 }
1065
1066 /// Returns an [`ArrayView`] of the internal array.
1067 ///

Callers 15

exclusive_borrowFunction · 0.80
from_rust_to_pythonFunction · 0.80
extractMethod · 0.80
test_debug_formattingFunction · 0.80
borrow_multiple_arraysFunction · 0.80
borrow_multiple_viewsFunction · 0.80
as_sliceFunction · 0.80
half_f16_worksFunction · 0.80
half_bf16_worksFunction · 0.80

Implementers 1

array.rssrc/array.rs

Calls 1

try_readwriteMethod · 0.80

Tested by 15

from_rust_to_pythonFunction · 0.64
test_debug_formattingFunction · 0.64
borrow_multiple_arraysFunction · 0.64
borrow_multiple_viewsFunction · 0.64
as_sliceFunction · 0.64
half_f16_worksFunction · 0.64
half_bf16_worksFunction · 0.64
distinct_borrowsFunction · 0.64
borrows_span_threadsFunction · 0.64