Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers: Error required for list of array #1721

Closed
EmilyBourne opened this issue Feb 12, 2024 · 1 comment · Fixed by #1808
Closed

Containers: Error required for list of array #1721

EmilyBourne opened this issue Feb 12, 2024 · 1 comment · Fixed by #1808
Assignees
Labels
bug Containers tuples/lists/sets/maps

Comments

@EmilyBourne
Copy link
Member

EmilyBourne commented Feb 12, 2024

Describe the bug

Containers such as lists and sets need to ensure that each element respects the homogeneity conditions. Each element should have the same:

  • datatype
  • precision
  • rank
  • order
  • class type

However there is currently no way to determine the order of an element of a container. The type mechanism should be improved to handle this.

But in the meantime an error should be raised to prevent the user from creating lists of multi-dimensional arrays (2D or more) as we would not know how to index an element of such a list.

To Reproduce

Provide code to reproduce the behaviour:

a = [np.ones((3,4))]
a.append(np.ones((5,6), order='F'))
a : 'float[:,:]' = []
a.append(np.ones((5,6), order='F'))
@EmilyBourne EmilyBourne added bug blocked Cannot be solved/merged until something else is fixed good-first-issue Containers tuples/lists/sets/maps labels Feb 12, 2024
@EmilyBourne
Copy link
Member Author

cc: @Farouk-Echaref

@EmilyBourne EmilyBourne self-assigned this Apr 10, 2024
@EmilyBourne EmilyBourne removed blocked Cannot be solved/merged until something else is fixed good-first-issue labels Apr 10, 2024
@yguclu yguclu closed this as completed in e36726f Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Containers tuples/lists/sets/maps
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant