def METHOD_NAME():
    grid = make_pupil_grid(2)
    A = Field(np.random.randn(3, 3, grid.size), grid)
    for num_modes in [1, 2]:
        B = field_inverse_truncated_modal(A, num_modes)
        BB = np.empty_like(B)
        for i in range(grid.size):
            BB[..., i] = inverse_truncated_modal(A[..., i], num_modes)
        assert np.allclose(B, BB)