The proposed plan is to divide array analysis into two parts:
Insert assertions at places where broadcast rules would apply;
Array size equivalences would then look at assertions, removing those that can be derived from "previous" ones, and building equivalence classes along the way.
At the end of the process, residual assertions become dynamic checks that would throw error if condition doesn't match.
Related discussion numba/numba#2399
The proposed plan is to divide array analysis into two parts:
Insert assertions at places where broadcast rules would apply;
Array size equivalences would then look at assertions, removing those that can be derived from "previous" ones, and building equivalence classes along the way.
At the end of the process, residual assertions become dynamic checks that would throw error if condition doesn't match.