Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array Transforms » SplitArray


Divides an array into two parts at the given index.

Name Type Range Description
inArray <T>Array Input array
inIndex Integer 0 - Index of the first element that is passed to the second of the output arrays
inInverse Bool Reversed order in the array
outArray1 <T>Array First output array
outArray2 <T>Array Second output array

The type of this filter is defined using the type variable T which represents any valid type. Read more.


The operation divides the inArray into two parts. The elements on positions smaller than inIndex are passed to outArray1, while the remaining ones are passed to outArray2. The index numbering in Adaptive Vision Studio is zero-based.


inArray = {1,4,3,2,5}
inIndex = 3
outArray1 = {1,4,3}
outArray2 = {2,5}


This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Index out of range in SplitArray.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • CropArray – Selects a continuous subsequence of array elements.
  • JoinArrays – Concatenates the input arrays one after another.