Helper method to get the bytes from a typed array.
(a: TypedArray)
| 2333 | describeWithFlags('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'); |
no outgoing calls
no test coverage detected
searching dependent graphs…