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

Function rslices

Lib/test/test_buffer.py:719–722  ·  view source on GitHub ↗

Generate random slices for a single dimension.

(n, allow_empty=False)

Source from the content-addressed store, hash-verified

717 return randslice_from_slicelen(slicelen, n)
718
719def rslices(n, allow_empty=False):
720 """Generate random slices for a single dimension."""
721 for _ in range(5):
722 yield rslice(n, allow_empty)
723
724def rslices_ndim(ndim, shape, iterations=5):
725 """Generate random slice tuples for 'shape'."""

Callers

nothing calls this directly

Calls 1

rsliceFunction · 0.85

Tested by

no test coverage detected