MCPcopy Create free account
hub / github.com/tensorflow/tfjs / fromUint8ToStringArray

Function fromUint8ToStringArray

tfjs-core/src/backends/backend_util.ts:53–61  ·  view source on GitHub ↗
(vals: Uint8Array[])

Source from the content-addressed store, hash-verified

51export {segment_util};
52
53export function fromUint8ToStringArray(vals: Uint8Array[]) {
54 try {
55 // Decode the bytes into string.
56 return vals.map(val => decodeString(val));
57 } catch (err) {
58 throw new Error(
59 `Failed to decode encoded string bytes into utf-8, error: ${err}`);
60 }
61}
62
63export function fromStringArrayToUint8(strings: string[]) {
64 return strings.map(s => encodeString(s));

Callers

nothing calls this directly

Calls 1

decodeStringFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…