MCPcopy Index your code
hub / github.com/tensorflow/tfjs / getBytes

Function getBytes

tfjs-core/src/tensor_test.ts:2335–2337  ·  view source on GitHub ↗

Helper method to get the bytes from a typed array.

(a: TypedArray)

Source from the content-addressed store, hash-verified

2333describeWithFlags('tensor.bytes()', ALL_ENVS, () => {
2334 /** Helper method to get the bytes from a typed array. */
2335 function getBytes(a: TypedArray): Uint8Array {
2336 return new Uint8Array(a.buffer);
2337 }
2338
2339 it('float32 tensor', async () => {
2340 const a = tf.tensor([1.1, 3.2, 7], [3], 'float32');

Callers 1

tensor_test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…