fix a compilation error in linalg
This commit is contained in:
parent
bf4ce87e5b
commit
dfbafff2e7
2 changed files with 39 additions and 25 deletions
|
|
@ -13,3 +13,19 @@ const
|
|||
]
|
||||
|
||||
echo "perm: ", a.perm, " det: ", a.det
|
||||
|
||||
# This tests multiple instantiations of a generic
|
||||
# proc involving static params:
|
||||
type
|
||||
Vector64*[N: static[int]] = ref array[N, float64]
|
||||
Array64[N: static[int]] = array[N, float64]
|
||||
|
||||
proc vector*[N: static[int]](xs: Array64[N]): Vector64[N] =
|
||||
new result
|
||||
for i in 0 .. < N:
|
||||
result[i] = xs[i]
|
||||
|
||||
let v1 = vector([1.0, 2.0, 3.0, 4.0, 5.0])
|
||||
let v2 = vector([1.0, 2.0, 3.0, 4.0, 5.0])
|
||||
let v3 = vector([1.0, 2.0, 3.0, 4.0])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue