MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / shape

Method shape

src/buffer.rs:245–247  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

243 /// However, dimensions of length 0 are possible and might need special attention.
244 #[inline]
245 pub fn shape(&self) -> &[usize] {
246 unsafe { slice::from_raw_parts(self.0.shape as *const usize, self.0.ndim as usize) }
247 }
248
249 /// Returns an array that holds, for each dimension, the number of bytes to skip to get to the next element in the dimension.
250 ///

Callers 1

get_ptrMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected