def from_lal_unit(lunit):
    """Convert a LALUnit` into a `~astropy.units.Unit`

    Parameters
    ----------
    lunit : `lal.Unit`
        the input unit

    Returns
    -------
    unit : `~astropy.units.Unit`
        the Astropy representation of the input

    Raises
    ------
    TypeError
        if ``lunit`` cannot be converted to `lal.Unit`
    ValueError
        if Astropy doesn't understand the base units for the input
    """
    return reduce(operator.mul, (
        units.Unit(str(LAL_UNIT_INDEX[i])) ** exp for
        i, exp in enumerate(lunit.unitNumerator)))
def from_lal_unit ( lunit ) : return reduce ( operator . mul , ( units . Unit ( str ( LAL_UNIT_INDEX [ i ] ) ) ** exp for i , exp in enumerate ( lunit . unitNumerator ) ) )
Convert a LALUnit` into a `~astropy.units.Unit`

    Parameters
    ----------
    lunit : `lal.Unit`
        the input unit

    Returns
    -------
    unit : `~astropy.units.Unit`
        the Astropy representation of the input

    Raises
    ------
    TypeError
        if ``lunit`` cannot be converted to `lal.Unit`
    ValueError
        if Astropy doesn't understand the base units for the input