E-CE0008 — Array index out of bounds
Error Type |
|
|---|---|
Phase |
compiling the problem into an OMMX instance |
Python exception |
|
Message
Index {index} is out of bounds for axis {dim}, which has size {size}
Cause
An array subscript evaluated to an index that is greater than or equal to the size of the corresponding axis. This typically happens when a loop or constraint domain iterates over more elements than the instance data actually provides.
Fix
Make sure the iteration range matches the data, e.g. bound loops by the array’s length (d.len_at(0) / d.shape[0]) rather than a hard-coded constant, or supply larger instance data.