MCPcopy
hub / github.com/tensorflow/tfjs / naiveMerge

Function naiveMerge

tfjs-data/src/iterators/lazy_iterator_test.ts:471–478  ·  view source on GitHub ↗
(xs: TensorContainer[])

Source from the content-addressed store, hash-verified

469 */
470 it('zipping TensorContainer streams requires manual merge', async () => {
471 function naiveMerge(xs: TensorContainer[]): TensorContainer {
472 const result = {};
473 for (const x of xs) {
474 // For now, we do nothing to detect name collisions here
475 Object.assign(result, x);
476 }
477 return result;
478 }
479
480 const a = new TestIntegerIterator().map(x => ({'a': x}));
481 const b = new TestIntegerIterator().map(x => ({'b': x * 10}));

Callers 1

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…