MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_last_dim_contiguous

Method is_last_dim_contiguous

crates/vm/src/protocol/buffer.rs:385–388  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

383 }
384
385 fn is_last_dim_contiguous(&self) -> bool {
386 let (_, stride, suboffset) = self.dim_desc[self.ndim() - 1];
387 suboffset == 0 && stride == self.itemsize as isize
388 }
389
390 pub fn is_zero_in_shape(&self) -> bool {
391 self.dim_desc.iter().any(|(shape, _, _)| *shape == 0)

Callers 2

for_each_segmentMethod · 0.80
zip_eqMethod · 0.80

Calls 1

ndimMethod · 0.45

Tested by

no test coverage detected