Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When left indexing with an index out of the matrix dimensions inside a for loop, the error message only contains ArrayOutOfBounds information about the matrix block which does not correspond to actual matrix dimenions. This happens only when the left-indexing is inside a for-loop.
To reproduce this, run the two snippets below:
Okay:
A = matrix(2.0, rows=10, cols=10) A[11,10] = 1.0 print(as.scalar(A[10,10]))
Not Okay:
A = matrix(2.0, rows=10, cols=10)
for (i in 1:10) {
A[11,10] = 1.0
}
print(as.scalar(A[10,10]))