With the recent libasr sync, we are seeing the following issue with multi-dimensional arrays in LPython.
(lp) ubaid@DESKTOP-UR96JOC:~/lpython$ cat examples/expr2.py
from lpython import i32
from numpy import empty, int32
def main0():
x: i32[2, 5] = empty([2, 5], dtype=int32)
print(x)
main0()
(lp) ubaid@DESKTOP-UR96JOC:~/lpython$ PYTHONPATH=./src/runtime/lpython python examples/expr2.py
[[ 947372589 22011 0 0 -1864968336]
[ 32530 -1864968272 32530 48 0]]
(lp) ubaid@DESKTOP-UR96JOC:~/lpython$ ./src/bin/lpython examples/expr2.py
semantic error: Type mismatch in annotation-assignment, the types must be compatible
--> examples/expr2.py:5:5
|
5 | x: i32[2, 5] = empty([2, 5], dtype=int32)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i32[2,5]' and 'i32[10]')
Note: Please report unclear, confusing or incorrect messages as bugs at
https://github.com/lfortran/lfortran/issues.
Fixing the above should hopefully get several of our array integration tests working again.
Reactions are currently unavailable
With the recent libasr sync, we are seeing the following issue with multi-dimensional arrays in LPython.
Fixing the above should hopefully get several of our array integration tests working again.