E-TE0502 — Jagged array depth undetermined
Error Type |
|
|---|---|
Phase |
converting values while building or compiling the model |
Python exception |
|
Message
Could not determine the depth of the jagged array.
Possible fix: ensure all sub-arrays have a consistent nesting depth.
Cause
JijModeling could not determine a single consistent nesting depth for a jagged array.
This is raised from internal jagged-array conversions: when sub-arrays of a jagged value disagree in nesting depth, or when a jagged intermediate value has to be converted to a rectangular array but its sub-arrays disagree in shape.
Plainly mixed-depth Python input such as [[1, 2], 3] is normally rejected earlier with E-TE0500.
Fix
Make every branch of the nested data reach scalars at the same depth, and use values whose rows have different lengths only where jagged arrays are accepted; where a rectangular array is required, all sub-arrays must also have the same shape.