Getting array rank reduction error

IIRC, array rank reduction error is when certain nodes cannot accept an input where the levels are inconsistent, meaning there are elements in and out of nested list, at all @L’s instead of a consistent level. For example using a list like:

[1,2,3,[4,5,6],7]; where the elements are at different levels would give you an error but
[[1,2,3],[4,5,6,7]]; would not because it is consistently 2 levels deep.

The best way to resolve this is to use a consistent leveled input. If that is not possible, a workaround would be to flatten completely, do the changes you need to, then restructure the new list to match the old.

2 Likes