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

Method get

src/array.rs:1490–1497  ·  view source on GitHub ↗
(&self, index: impl NpyIndex<Dim = D>)

Source from the content-addressed store, hash-verified

1488
1489 #[inline(always)]
1490 unsafe fn get(&self, index: impl NpyIndex<Dim = D>) -> Option<&T>
1491 where
1492 T: Element,
1493 D: Dimension,
1494 {
1495 let ptr = get_raw(self, index)?;
1496 Some(&*ptr)
1497 }
1498
1499 #[inline(always)]
1500 unsafe fn get_mut(&self, index: impl NpyIndex<Dim = D>) -> Option<&mut T>

Callers 2

get_ownedMethod · 0.45

Calls 1

get_rawFunction · 0.85

Tested by

no test coverage detected