We would need a  way to know the shape of the fractions array in advance. Notice that this is common to all aggregations involving numpy arrays. We should find a generic solution and apply it everywhere. This is a matter for a chat one of these days.