I define the following in a Jupyter notebook.
package ArrayTest {
attribute arr : Collections::Array = ((1,2), (3,4), (5,6));
attribute arr_size : ScalarValues::Natural = CollectionFunctions::size(arr);
}
The evaluation
%eval ArrayTest::arr_size
returns
LiteralInteger 1 (003181e2-c969-4776-863d-90121656a037)
I note that there is zero documentation for functions like this in either the KerML standard or Pilot Implementation.
In Python for the same array, I get a reasonable result.
In [1]: import numpy as np
In [2]: arr = np.array([[1,2],[3,4],[5,6]])
In [3]: arr.size
Out[3]: 6