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

Function flatmap

tfjs-data/src/iterators/lazy_iterator.ts:309–311  ·  view source on GitHub ↗

* Maps this stream through a 1-to-many transform. * * @param transform A function mapping a stream element to an array of * transformed elements. * * @returns A `DataStream` of transformed elements.

(transform: (value: T) => O[])

Source from the content-addressed store, hash-verified

307 * @returns A `DataStream` of transformed elements.
308 */
309 flatmap<O>(transform: (value: T) => O[]): LazyIterator<O> {
310 return new FlatmapIterator(this, transform);
311 }
312
313 /**
314 * Apply a function to every element of the stream.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…