MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / resized_array

Function resized_array

windows/utils/improved_buffer.py:125–131  ·  view source on GitHub ↗
(array, newnbelt, newtype=None)

Source from the content-addressed store, hash-verified

123 return BUFFER(eltclass, dlen)(*obj)
124
125def resized_array(array, newnbelt, newtype=None):
126 if newtype is None:
127 newtype = array._type_
128 btype = BUFFER(newtype, newnbelt)
129 new_array = btype.from_address(ctypes.addressof(array))
130 new_array._base_array_ = array # Keep a ref to prevent some gc
131 return new_array
132
133
134

Callers

nothing calls this directly

Calls 1

BUFFERFunction · 0.85

Tested by

no test coverage detected