'Function used to calculate :math:`\frac{1}{H_z}`.
Parameters
z : array-like
Input redshifts.
Returns
E : ndarray, or float if input scalar
The inverse redshift scaling of the Hubble constant.
Notes
The return value, E, is defined such that :math:`H_z = H_0 / E`.'

def inv_efunc(self, z):

    if isiterable(z):
        z = np.asarray(z)
    (Om0, Ode0, Ok0, w0) = (self._Om0, self._Ode0, self._Ok0, self._w0)
    if self._massivenu:
        Or = (self._Ogamma0 * (1.0 + self.nu_relative_density(z)))
    else:
        Or = (self._Ogamma0 + self._Onu0)
    zp1 = (1.0 + z)
    return ((((zp1 ** 2) * ((((Or * zp1) + Om0) * zp1) + Ok0)) + (Ode0 * (zp1 ** (3.0 * (1.0 + w0))))) ** (-0.5))
