'Lookback time in Gyr to redshift ``z``.
The lookback time is the difference between the age of the
Universe now and the age at redshift ``z``.
Parameters
z : array-like
Input redshifts.  Must be 1D or scalar
Returns
t : `~astropy.units.Quantity`
Lookback time in Gyr to each input redshift.
See Also
z_at_value : Find the redshift corresponding to a lookback time.'

def lookback_time(self, z):

    from scipy.integrate import quad
    f = (lambda red: quad(self._lookback_time_integrand_scalar, 0, red)[0])
    return (self._hubble_time * vectorize_if_needed(f, z))
