MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / create_buffer

Function create_buffer

test/py/test_array.py:50–57  ·  view source on GitHub ↗
(t, data, shape)

Source from the content-addressed store, hash-verified

48
49
50def create_buffer(t, data, shape):
51 a = array.array(t, data)
52 if sys.version_info >= (3, 0):
53 m = memoryview(a.tobytes())
54 return m.cast(t, shape)
55 else:
56 m = memoryview(a.tostring())
57 return m
58
59
60def check_argument(a):

Callers 2

test_shapeFunction · 0.70
test_inputFunction · 0.70

Calls 2

arrayMethod · 0.80
castMethod · 0.80

Tested by

no test coverage detected