Skip navigation

FlexPro Documentation 2025

flexpro.Data

Creates a flexpro.Data object that represents a simple or composite FlexPro data structure with value and unit.

Syntax

flexpro.Data(y[, unit_y, x, _unit_x , z , unit_z])

 

The syntax of the Data functionconsists of the following elements:

Element

Description

value_y

Required. The value of a simple data structure or X component of a composite data structure.

unit_y

Optional. The string to be assigned to the Y component as a unit.

value_x

Optional. The X component of a composite data structure.

unit_x

Optional. The string to be assigned to the X component as a unit.

value_z

Optional. The Z component of a composite data structure.

unit_z

Optional. The string to be assigned to the Z component as a unit.

Remarks

You can pass a flexpro.Data object or a Python value which can be converted into FlexPro data as the value.

Result

The newly created flexpro.Data object.

Available In

FlexPro Professional, Developer Suite

Examples

v = flexpro.Data(1.3, "dB")

Creates a scalar value 1.3 dB.

x = np.linspace(0, 10, 100)
y = np.sin(x)
this.value = flexpro.Data(y, "V", x, "s")

Creates a "Signal" data structure with Y and X components and returns it as the result of the formula.

x = np.linspace(0, 10, 100)
this.value = flexpro.Data(value_y = np.sin(x), value_x = x)

Creates a "Signal" data structure without units. Please note that the arguments cannot be assigned here via their sequence but must be explicitly assigned via their names.

 

See Also

unit_y Property

unit_z Property