WeaveArrays Op

WeaveArrays

weave/interleave two input arrays into one combined array


  • With chunk size 1, it alternates element-by-element: [a1, b1, a2, b2, a3, b3, ...].
  • With a larger chunk size, it takes that many elements from Array 1, then that many from Array 2, then repeats — e.g. chunk size 2: [a1, a2, b1, b2, a3, a4, b3, b4, ...].

Full Name
  • Ops.Array.WeaveArrays
Visibility
  • Core Op - visible for everyone
License
  • MIT
AuthorCreated
githubMaintained by Team


INPUT PORTS


Array 1 (Array)

The first array

Array 2 (Array)

The second array

Chunk Size (Number)

How many elements will be used from each array in a chunk, e.g. when set to 1 the resulting array will contain one element from Array 1, one from Array 2, then one from Array 1 again and so on

OUTPUT PORTS


Combined Array (Array)

The combined (weaved) array


Changelog

Patches using WeaveArrays

  • Examples
  • Public
  • My Patches