def nonlin_power(cosmo, k, a, p_of_k_a='delta_matter:delta_matter'):
    """The non-linear power spectrum.

    Args:
        cosmo (:class:`~pyccl.core.Cosmology`): Cosmological parameters.
        k (float or array_like): Wavenumber; Mpc^-1.
        a (float): Scale factor.
        p_of_k_a (str): string specifying the power spectrum to
            compute (which should be stored in `cosmo`). Defaults to
            the non-linear matter power spectrum.

    Returns:
        float or array_like: Non-linear power spectrum.
    """
    cosmo.compute_nonlin_power()
    if p_of_k_a not in cosmo._pk_nl:
        raise KeyError("Power spectrum %s unknown" % p_of_k_a)
    return cosmo._pk_nl[p_of_k_a].eval(k, a, cosmo)