Count Elements in Specified Dimension in Data List
Function Description
Counts the number of elements at a specified dimension level in the input data list.
Use Cases
General-purpose element count step, can be used together with the “Repeat Data and Concatenate Copies” step to ensure that the data length of each input port in subsequent steps is equal.
Inputs
Unnamed: Data list to be operated on. Supported data types include PoseList, NumberList, StringList, Vector3DList, BoolList, IndexList.
Outputs
Unnamed: Number of elements at the specified level in the data list.
Parameters
Dimension of the Variable in the Array: Specifies the dimension where the elements to be counted are located in the entire nested array structure.
Dimension Structure Description:
For nested array structures, this parameter determines at which dimension level to perform the counting.
For example: Selecting dimension 0 will count the number of innermost basic elements; selecting dimension 1 will count the number of sub-arrays contained in the outer array.
Examples:
Input data structure:
[[1,2,3], [4,5,6], [7,8,9]]Selecting dimension 1: The count result is 3 (contains 3 sub-arrays)
Selecting dimension 0: The count result is [3,3,3] (3 groups of 3 numeric elements in total)