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

Function take

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

* Limits this stream to return at most `count` items. * * @param count The maximum number of items to provide from the stream. If * a negative or undefined value is given, the entire stream is returned * unaltered.

(count: number)

Source from the content-addressed store, hash-verified

421 * unaltered.
422 */
423 take(count: number): LazyIterator<T> {
424 if (count < 0 || count == null) {
425 return this;
426 }
427 return new TakeIterator(this, count);
428 }
429
430 /**
431 * Skips the first `count` items in this 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…