Shape (FPScript)

21.09.2021

Determines the dimension lengths of a data set.

Syntax

Shape(DataSet)

 

The syntax of the Shape function consists of the following parts:

Part

Description

DataSet

The data set for which the dimension lengths are to be determined.

All data structures are allowed. All data types are permitted.

Remarks

As the result the function returns a data series of data type 64-bit integer.

For aggregate data structures, only the Y component is considered. If the data set is a scalar value, the result is a data series with zero values. If the data set or its Y component is a data series, then the result is a data series with a value specifying the number of values in the data series. If it is a data matrix, then the result is a data series with two values. The first value specifies the number of data series or columns, and the second value specifies the number of values for each data series or the number of rows.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Shape({1, 3, 4})

Results in {3L}.

Shape({1, 3, 4} # 2)

Results in {2L, 3L}.

See Also

NumberOfColumns Function

NumberOfElements Function

NumberOfRows Function

Rank Function

Reshape Function

Share article or send as email:

You might be interested in these articles