MCPcopy Index your code
hub / github.com/python/cpython / memory_index

Function memory_index

Lib/test/test_buffer.py:486–492  ·  view source on GitHub ↗

Location of an item in the underlying memory.

(indices, t)

Source from the content-addressed store, hash-verified

484 return lst
485
486def memory_index(indices, t):
487 """Location of an item in the underlying memory."""
488 memlen, itemsize, ndim, shape, strides, offset = t
489 p = offset
490 for i in range(ndim):
491 p += strides[i]*indices[i]
492 return p
493
494def is_overlapping(t):
495 """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

Used in the wild real call sites across dependent graphs

searching dependent graphs…