lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Suggestion: replace Array type with numpy.typing.NDArray

Open rebcabin opened this issue 1 year ago • 1 comments

So far as I can tell, the semantics are identical. I believe we ought to use a popular, existing type rather than inventing our own type, if we can.

https://numpy.org/devdocs/reference/typing.html

rebcabin avatar Feb 05 '24 19:02 rebcabin

The numpy.typing.NDArray semantics is different. Doesn't seem to allow specifying rank and dimensions at compile time, which is needed for ASR arrays.

If you know how to use it in our tests and preserve the information that we need, then we should definitely do it.

certik avatar Feb 05 '24 19:02 certik