Skip to content

CollectionFunctions::size() returns unexpected value. #698

@l-johnston

Description

@l-johnston

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions