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

Function create_buffer

test/py/test_save_load.py:60–67  ·  view source on GitHub ↗
(t, data, shape)

Source from the content-addressed store, hash-verified

58
59
60def create_buffer(t, data, shape):
61 a = array.array(t, data)
62 if sys.version_info >= (3, 0):
63 m = memoryview(a.tobytes())
64 return m.cast(t, shape)
65 else:
66 m = memoryview(a.tostring())
67 return m
68
69def test_load_save_arg():
70 data = [1,2,3,4]

Callers 1

test_load_save_argFunction · 0.70

Calls 2

arrayMethod · 0.80
castMethod · 0.80

Tested by

no test coverage detected