'Returns dark energy equation of state at redshift ``z``.
Parameters
z : array-like
Input redshifts.
Returns
w : ndarray, or float if input scalar
The dark energy equation of state
Notes
The dark energy equation of state is defined as
:math:`w(z) = P(z)/\rho(z)`, where :math:`P(z)` is the
pressure at redshift z and :math:`\rho(z)` is the density
at redshift z, both in units where c=1.  Here this is
:math:`w(z) = w_p + w_a (a_p - a)` where :math:`a = 1/1+z`
and :math:`a_p = 1 / 1 + z_p`.'

def w(self, z):

    if isiterable(z):
        z = np.asarray(z)
    apiv = (1.0 / (1.0 + self._zp))
    return (self._wp + (self._wa * (apiv - (1.0 / (1.0 + z)))))
