-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Inferring nested static[T]
#3153
Labels
Comments
Latest nim devel now just crashes:
|
Just wanted to mention that the following workaround works (and it is what I am using in linalg to infer matrix sizes) type DoubleArray32[M, N: static[int]] = array[M, array[N, float32]]
type DoubleArray64[M, N: static[int]] = array[M, array[N, float64]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not work
failing with
Error: cannot generate code for: M
.In itself, this is not an issue: I think it has to do with
array
accepting a range as its first parameter, and it is enough to wrap it into a type with another name:It works for nested arrays as well:
Unfortunately, trying to get the inner dimension fails:
This fails with
Error: cannot instantiate: 'N'
. Unlike the previous example, I was not able to find a workaround for thisThe text was updated successfully, but these errors were encountered: