I think this needs a `np.ndindex(*shape)`.