check that rows is an integer for grid2d

This commit is contained in:
Adrian Mariano 2024-11-27 20:19:48 -05:00
parent c86d36d122
commit f982b96d12

View File

@ -654,6 +654,7 @@ module grid_copies(spacing, n, size, stagger=false, inside=undef, nonzero)
is_vector(n)? assert(len(n)==2) n :
size!=undef && spacing!=undef? v_floor(v_div(size,spacing))+[1,1] :
[2,2];
dummy2 = assert(is_int(n[0]) && is_int(n[1]), "The number of rows/columns must be an integer");
offset = v_mul(spacing, n-[1,1])/2;
poslist =