-
Notifications
You must be signed in to change notification settings - Fork 166
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
Unhandled exception with array parameter / argument #2497
Labels
severe
not blocker, but causes undesirable workarounds
Comments
Also fails with double colon: def spot_print_lpython_array(a: i16[:, :], rows: i32, cols: i32) -> None:
pass def spot_print_lpython_array(a: i16[::], rows: i32, cols: i32) -> None:
pass |
Also fails with one-dimensional array: foo: i16[n] = empty((15,), dtype=i16)
spot_print_lpython_array(foo, n, m) |
Marking this Issue |
Here is another example of where it's needed to stand in for missing broadcast of constant: def clear_row(a: i16[:], row: i32, cols: i32) -> None:
j: i32
for j in range(cols):
a[row, j] = i16(0) VR_SIZE: i32 = 32_768
k: i32
A_ik: i16
jj: i32
ii: i32
i: i32
for jj in range(0, l, VR_SIZE): # each VR-col chunk in B and C
for ii in range(0, n, M2): # each M2 block in A cols and B rows
for i in range(0, M2): # zero-out rows of C
# Due to Issue 2496, I cannot pass an array to a function
clear_row(Cnl, i + ii, l) # ~~~~~~~~~~~~~~~~~~ ATTENTION ~~~~~~
# Cnl[i + ii, :] = 0
pass |
There are several issues:
Now it works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I imitated some code in
integration_tests/array_expr02.py
. Here is a snippet:In my context, this pattern generated an unhandled exception.
The text was updated successfully, but these errors were encountered: