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

Function memory_index

Lib/test/test_buffer.py:474–480  ·  view source on GitHub ↗

Location of an item in the underlying memory.

(indices, t)

Source from the content-addressed store, hash-verified

472 return lst
473
474def memory_index(indices, t):
475 """Location of an item in the underlying memory."""
476 memlen, itemsize, ndim, shape, strides, offset = t
477 p = offset
478 for i in range(ndim):
479 p += strides[i]*indices[i]
480 return p
481
482def is_overlapping(t):
483 """The structure 't' is overlapping if at least one memory location

Callers 1

is_overlappingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected