MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / get_float32_buffer

Function get_float32_buffer

plugins/src/samples.py:75–80  ·  view source on GitHub ↗
(buffer: np.ndarray)

Source from the content-addressed store, hash-verified

73
74
75def get_float32_buffer(buffer: np.ndarray):
76 if buffer.dtype == np.int16:
77 return buffer.astype(np.float32) / np.iinfo("int16").max
78 if buffer.dtype == np.int8:
79 return buffer.astype(np.float32) / np.iinfo("int8").max
80 return buffer
81
82
83def validate_samples(samples_b64: SamplesB64, samples_cloud: SamplesCloud):

Callers 1

get_from_samples_cloudFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected