'Return the density parameter for baryonic matter at redshift ``z``.
Parameters
z : array-like
Input redshifts.
Returns
Ob : ndarray, or float if input scalar
The density of baryonic matter relative to the critical density at
each redshift.
Raises
ValueError
If Ob0 is None.'

def Ob(self, z):

    if (self._Ob0 is None):
        raise ValueError(u'Baryon    density    not    set    for    this    cosmology')
    if isiterable(z):
        z = np.asarray(z)
    return ((self._Ob0 * ((1.0 + z) ** 3)) * (self.inv_efunc(z) ** 2))
