Convert Generic Data to List

Description

This operator is used to encapsulate a single data item of any type into a List structure. It nests the input data within corresponding levels of square brackets based on the user-specified "Dimension" parameter, thereby changing the data’s dimension attribute.

Overview

Wraps single data items into a list with specified nesting levels, used for type conversion or unifying data formats.

Scenarios

  • Type Adaptation: When a subsequent operator requires the input port to be of List type, use this operator to wrap a single object into a list of length 1 to meet the input requirement.

  • Building Single-Element Lists: Standardize a single data item into a list format before performing batch processing logic operations on it.

Inputs and Outputs

Inputs

Input Data: Selectable instantiation of any type of data as input, such as numbers, strings, image objects, dictionaries, etc.

Outputs

Output Data: Processed List data.

Parameters

Dimension

Description

Configures the number of list nesting levels added around the input data.

Tuning Instructions

This parameter determines how many layers of square brackets "[]" are wrapped around the input data.

  • 1 (default): Wraps one layer. For example, if the input data is "A", the output will be "[A]". This is the most common setting, used to convert a single object into a single-element list.

  • 2: Wraps two layers. For example, if the input data is "A", the output will be "".

  • N: Applies N levels of recursive nesting.

Parameter Range

Values/Range: [1, 10000]

Default: 1