Skip to content

Conversation

@gschnabel
Copy link
Contributor

I've implemented simple array functionality and associated tests. Now syntax like x[3] or x[2][4] can be used for accessing elements in simple arrays and nested arrays, respectively.

Importantly, the underlying Python data type should be list so that it works as expected. Therefore, in contrast to numpy arrays, the shape of arrays can be irregular (e.g., different number of elements per row). I think this is a good choice if the central data structure we want to manipulate/transform is data in the JSON format, for which the definition of arrays mirrors the Python list data type.

Copy link
Member

@thomasms thomasms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I just had a few small comments.

I also tried _parse_and_assert("[1,4,1,1,-9]", [1,4,1,1,-9]) as a test but I guess this only does array evaluation, and does not support hard coded arrays.

@julia-sprenger julia-sprenger mentioned this pull request Oct 10, 2024
12 tasks
@gschnabel gschnabel merged commit 1270582 into main Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants