Flattens an arbitrarily nested array.
const a = [[1, 2], [3, 4], [5, [6, [7]]]];const flat = tf.util.flatten(a);console.log(flat); Copy
const a = [[1, 2], [3, 4], [5, [6, [7]]]];const flat = tf.util.flatten(a);console.log(flat);
The nested array to flatten.
Optional
The destination array which holds the elements.
If true, avoids flattening the typed arrays. Defaults to false.
Generated using TypeDoc
Flattens an arbitrarily nested array.