2D array filled with consecutive integers

You might try the suggestion from the error message:

consider calling collect

a = reshape(collect(1:w*h), w, h)
2 Likes