ArgumentError: no outer repetition count may be negative; got (-1,)

The Nh variable may be smaller than or equal to 3? I would guess it has value 2 when the error occurs. (You would be passing -1 to repeat in this case.)

1 Like