E-CE0009 — Jagged array subscript out of bounds
Error Type |
|
|---|---|
Phase |
compiling the problem into an OMMX instance |
Python exception |
|
Message
Subscript [{...}] is out of bounds for the jagged array
Cause
A subscript points outside the structure of a jagged array: either the row index exceeds the number of rows, or the inner index exceeds the length of that particular row. Rows of a jagged array can have different lengths, so a bound that is valid for one row may be invalid for another.
Fix
Bound your loops by the jagged array’s actual structure, e.g. use d.len_at(0) for the number of rows and per-row lengths for the inner loops, instead of a single fixed bound.