The reason it is confusing is the martic is generated from a list of lists.
This is done by the first list being the columns of the first row numbered by i.
But matrices usually use the first number to be the rows and the second index to be the columns.
So the number of the first variable should j for the column and i for the rows.
The second reason is the limits are the width and height and not rows and columns.
I don't know if it was done this way for a reason.
The reason it is confusing is the martic is generated from a list of lists. This is done by the first list being the columns of the first row numbered by i. But matrices usually use the first number to be the rows and the second index to be the columns. So the number of the first variable should j for the column and i for the rows.
The second reason is the limits are the width and height and not rows and columns. I don't know if it was done this way for a reason.