def num_grid_points(d, mu):
    """
    Checks the number of grid points for a given d, mu combination.

    Parameters
    ----------
    d, mu : int
        The parameters d and mu that specify the grid

    Returns
    -------
    num : int
        The number of points that would be in a grid with params d, mu

    Notes
    -----
    This function is only defined for mu = 1, 2, or 3

    """
    if mu == 1:
        return 2*d + 1

    if mu == 2:
        return 1 + 4*d + 4*d*(d-1)/2.

    if mu == 3:
        return 1 + 8*d + 12*d*(d-1)/2. + 8*d*(d-1)*(d-2)/6.