Group Data

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Function

This Step groups elements within a data list by index. Multiple input ports can be set to perform grouping operations with the same index list within each data list at the same time. If the index list is \[[0, 2], [1, 3, 4]] and the input data is [100, 20, 300, 40, 500], the output is \[[100, 300], [20, 40, 500 ]].

Usage Scenario

This Step is a general data sorting Step.

Input and Output

Input

Input port Data type Description

Indices

Index[] []

Index list input at this port will be used for grouping.

Unnamed

Abstract

Data input to this port will be grouped.

Output

Output port Data type Description

Unnamed

Abstract []

Grouped data.

Parameter Description

Ports Settings

Parameter Description

Port Number (1–15)

Description: This parameter is used to specify the number of input and output ports of the Step. With each new port, you can connect multiple sets of data and perform group operations on multiple sets of data according to the same mapping index.
Default value: 1
Instruction: If you need to use the same index group on multiple data lists, you can increase the number of ports accordingly. For example, when it is set to 2, there are 2 input ports and 2 output ports that process different data lists.

Operation Layer

Description: This parameter is used to specify the operation hierarchy of the data received by each input port. When the Operation Layer is set to 0, the input data is a one-dimensional list, and operations will be performed on each element of the data list in groups. When the Operation Layer is set to 1, the input data is a two-dimensional list, and each sub-list in the data list will be grouped.

Default value: 0

Instruction: This parameter is set according to the dimension of the input data. For example, if the index is [[0, 2]], [1, 3]] and the input data is [[10, 20, 30,]] 40, [50, 60, 70, 80]], the operation layer is 1 and the output is [[[10, 30]], [20, 40]], [[50, 70]], [60, 80]].

If you need to synchronize the grouping of multiple sets of independent data (such as pose lists and label lists), it is recommended to use multiple ports and keep the operation layer at 0.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.