Skip to main content
`Ctrl`+`K`

# CriticalDensity

class astropy.cosmology.traits.CriticalDensity

  Bases: `object`

  The object has attributes and methods for the critical density.

  Methods Summary

  `critical_density`(z, /) | Critical density in grams per cubic cm at redshift `z`.

  Methods Documentation

  critical_density(z, /)

    Critical density in grams per cubic cm at redshift `z`.

    Parameters:
      z Quantity-like [‘redshift’], numpy:array_like

        Input redshift.

        Changed in version 7.0: Passing z as a keyword argument is deprecated.

        Changed in version 8.0: z must be a positional argument.

    Returns:
      rho `Quantity` [:ref: ‘mass density’]

        Critical density at each input redshift.