Skip to main content
`Ctrl`+`K`

# AstropyDumper

class astropy.io.misc.yaml.AstropyDumper(stream, default_style=None, default_flow_style=False, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None, sort_keys=True)

  Bases: `SafeDumper`

  Custom SafeDumper that represents astropy core objects as well as Python tuple and unicode objects.

  This class is not directly instantiated by user code, but instead is used to maintain the available representer functions that are called when generating a YAML stream from an object. See the PyYaml documentation for details of the class signature.

  Attributes Summary

  `yaml_multi_representers` |
  `yaml_representers` |

  Methods Summary

  `represent_float`(data) |

  Attributes Documentation

  yaml_multi_representers = {<class 'astropy.coordinates.angles.core.Angle'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.angles.core.Latitude'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.angles.core.Longitude'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.altaz.AltAz'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.cirs.CIRS'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.BarycentricMeanEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.BarycentricTrueEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.CustomBarycentricEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.GeocentricMeanEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.GeocentricTrueEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.HeliocentricEclipticIAU76'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.HeliocentricMeanEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.ecliptic.HeliocentricTrueEcliptic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.equatorial.TEME'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.equatorial.TETE'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.fk4.FK4'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.fk4.FK4NoETerms'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.fk5.FK5'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.galactic.Galactic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.galactocentric.Galactocentric'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.gcrs.GCRS'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.gcrs.PrecessedGeocentric'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.hadec.HADec'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.hcrs.HCRS'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.icrs.ICRS'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.itrs.ITRS'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.lsr.GalacticLSR'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.lsr.LSR'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.lsr.LSRD'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.lsr.LSRK'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.builtin_frames.supergalactic.Supergalactic'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.earth.EarthLocation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.cartesian.CartesianDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.cartesian.CartesianRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.cylindrical.CylindricalDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.cylindrical.CylindricalRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.geodetic.GRS80GeodeticRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.geodetic.WGS72GeodeticRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.geodetic.WGS84GeodeticRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.PhysicsSphericalDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.PhysicsSphericalRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.RadialDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.RadialRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.SphericalCosLatDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.SphericalDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.SphericalRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.UnitSphericalCosLatDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.UnitSphericalDifferential'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.coordinates.representation.spherical.UnitSphericalRepresentation'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.units.core.UnitBase'>: <function _unit_representer>, <class 'astropy.units.function.core.FunctionUnitBase'>: <function _unit_representer>, <class 'astropy.units.function.logarithmic.Decibel'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.units.function.logarithmic.Dex'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.units.function.logarithmic.Magnitude'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.units.quantity.Quantity'>: <function _quantity_representer.<locals>.representer>, <class 'astropy.units.structured.StructuredUnit'>: <function _unit_representer>}
  yaml_representers = {<class 'NoneType'>: <function SafeRepresenter.represent_none>, <class 'astropy.coordinates.sky_coordinate.SkyCoord'>: <function _skycoord_representer>, <class 'astropy.cosmology._src.flrw.lambdacdm.FlatLambdaCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.lambdacdm.LambdaCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0cdm.FlatwCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0cdm.wCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0wacdm.Flatw0waCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0wacdm.w0waCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0wzcdm.Flatw0wzCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.w0wzcdm.w0wzCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.wpwazpcdm.FlatwpwaCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.cosmology._src.flrw.wpwazpcdm.wpwaCDM'>: <function yaml_representer.<locals>.representer>, <class 'astropy.table.serialize.SerializedColumn'>: <function _serialized_column_representer>, <class 'astropy.time.core.Time'>: <function _time_representer>, <class 'astropy.time.core.TimeDelta'>: <function _timedelta_representer>, <class 'bool'>: <function SafeRepresenter.represent_bool>, <class 'bytes'>: <function SafeRepresenter.represent_binary>, <class 'complex'>: <function _complex_representer>, <class 'datetime.date'>: <function SafeRepresenter.represent_date>, <class 'datetime.datetime'>: <function SafeRepresenter.represent_datetime>, <class 'dict'>: <function SafeRepresenter.represent_dict>, <class 'float'>: <function SafeRepresenter.represent_float>, <class 'int'>: <function SafeRepresenter.represent_int>, <class 'list'>: <function SafeRepresenter.represent_list>, <class 'numpy.bool'>: <function SafeRepresenter.represent_bool>, <class 'numpy.complex128'>: <function _complex_representer>, <class 'numpy.complex64'>: <function _complex_representer>, <class 'numpy.float16'>: <function AstropyDumper.represent_float>, <class 'numpy.float32'>: <function AstropyDumper.represent_float>, <class 'numpy.float64'>: <function AstropyDumper.represent_float>, <class 'numpy.int16'>: <function SafeRepresenter.represent_int>, <class 'numpy.int32'>: <function SafeRepresenter.represent_int>, <class 'numpy.int64'>: <function SafeRepresenter.represent_int>, <class 'numpy.int8'>: <function SafeRepresenter.represent_int>, <class 'numpy.longdouble'>: <function AstropyDumper.represent_float>, <class 'numpy.ndarray'>: <function _ndarray_representer>, <class 'numpy.uint16'>: <function SafeRepresenter.represent_int>, <class 'numpy.uint32'>: <function SafeRepresenter.represent_int>, <class 'numpy.uint64'>: <function SafeRepresenter.represent_int>, <class 'numpy.uint8'>: <function SafeRepresenter.represent_int>, <class 'numpy.void'>: <function _void_representer>, <class 'set'>: <function SafeRepresenter.represent_set>, <class 'str'>: <function SafeRepresenter.represent_str>, <class 'tuple'>: <function AstropyDumper._represent_tuple>, None: <function SafeRepresenter.represent_undefined>}

  Methods Documentation

  represent_float(data)