'Evaluates the redshift dependence of the dark energy density.
Parameters
z : array-like
Input redshifts.
Returns
I : ndarray, or float if input scalar
The scaling of the energy density of dark energy with redshift.
Notes
The scaling factor, I, is defined by :math:`\rho(z) = \rho_0 I`,
and is given by
.. math::
I = \exp \left( 3 \int_{a}^1 \frac{ da^{\prime} }{ a^{\prime} }
\left[ 1 + w\left( a^{\prime} \right) \right] \right)
It will generally helpful for subclasses to overload this method if
the integral can be done analytically for the particular dark
energy equation of state that they implement.'

def de_density_scale(self, z):

    from scipy.integrate import quad
    if isiterable(z):
        z = np.asarray(z)
        ival = np.array([quad(self._w_integrand, 0, log((1 + redshift)))[0] for redshift in z])
        return np.exp((3 * ival))
    else:
        ival = quad(self._w_integrand, 0, log((1 + z)))[0]
        return exp((3 * ival))
