atoti.array.len()#

atoti.array.len(measure, /)#

Return a measure equal to the number of elements of the passed array measure.

Example

>>> pnl_table = session.read_csv(
...     TEST_RESOURCES_PATH / "csv" / "pnl.csv",
...     array_separator=";",
...     keys={"Continent", "Country"},
...     table_name="PnL",
... )
>>> cube = session.create_cube(pnl_table)
>>> l, m = cube.levels, cube.measures
>>> m["Length"] = tt.array.len(m["PnL.SUM"])
>>> cube.query(m["PnL.SUM"], m["Length"])
                          PnL.SUM Length
0  doubleVector[10]{-20.163, ...}     10
Parameters:

measure (VariableMeasureConvertible)

Return type:

MeasureDescription