This seems confusing to me, and the form is unnecessary as the first element in each pair is unused
 (no further use of "pairs", maybe a code legacy thing?)

This whole bit could simply read:
``` interp_shape.extend(length for dim, length in enumerate(data.shape) if dim not in di) ```

On the other hand, as there are only going to be 'a few' dimensions any time, it would be perfectly reasonable to use a for loop, if that seems clearer, e.g. --
```
    for dim, length in enumerate(data.shape):
        if dim not in di:
            interp_shape.append(length)
```