def spline_grid_from_range(spline_size, spline_range, round_to=1e-6):
    """
    Compute spline grid spacing from desired one-sided range
    and the number of activation coefficients.

    Args:
        spline_size (odd int):
            number of spline coefficients
        spline_range (float):
            one-side range of spline expansion.
        round_to (float):
            round grid to this value
    """
    if int(spline_size) % 2 == 0:
        raise TypeError('size should be an odd number.')
    if float(spline_range) <= 0:
        raise TypeError('spline_range needs to be a positive float...')

    spline_grid = ((float(spline_range) /
                    (int(spline_size) // 2)) // round_to) * round_to

    return spline_grid