Converts $n and $q to scalars before creating additional PDLs

I believe zeros($n) results in a PDL with the same dims as $n if $n is a
PDL.