def e_z(z, **cosmo):
    """The unitless Hubble expansion rate at redshift z.

    In David Hogg's (arXiv:astro-ph/9905116v4) formalism, this is
    equivalent to E(z), defined in his eq. 14.

    Modified (JBJ, 29-Feb-2012) to include scalar w parameter

    """
    if 'w' in cosmo:
        return (cosmo['omega_M_0'] * (1 + z) ** 3.0 + cosmo['omega_k_0'] * 
            (1 + z) ** 2.0 + cosmo['omega_lambda_0'] * (1 + z) ** (1 +
            cosmo['w'])) ** 0.5
    else:
        return (cosmo['omega_M_0'] * (1 + z) ** 3.0 + cosmo['omega_k_0'] * 
            (1 + z) ** 2.0 + cosmo['omega_lambda_0']) ** 0.5
