AstropyDumper¶
-
class
astropy.io.misc.yaml.
AstropyDumper
(stream, default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None)[source] [edit on github]¶ Bases:
yaml.dumper.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
Attributes Documentation
-
yaml_multi_representers
= {<class 'astropy.coordinates.earth.EarthLocation'>: <function representer>, <class 'astropy.coordinates.angles.Longitude'>: <function representer>, <class 'astropy.coordinates.angles.Latitude'>: <function representer>, <class 'astropy.coordinates.angles.Angle'>: <function representer>, <class 'astropy.units.quantity.Quantity'>: <function representer>, <class 'astropy.units.core.Unit'>: <function _unit_representer>}¶
-
yaml_representers
= {<type 'bool'>: <unbound method SafeRepresenter.represent_bool>, <type 'int'>: <unbound method SafeRepresenter.represent_int>, <type 'tuple'>: <unbound method AstropyDumper._represent_tuple>, <type 'unicode'>: <unbound method SafeRepresenter.represent_unicode>, <class 'astropy.coordinates.sky_coordinate.SkyCoord'>: <function _skycoord_representer>, <class 'astropy.time.core.TimeDelta'>: <function _timedelta_representer>, <class 'astropy.units.core.IrreducibleUnit'>: <function _unit_representer>, <type 'list'>: <unbound method SafeRepresenter.represent_list>, <type 'NoneType'>: <unbound method SafeRepresenter.represent_none>, <type 'float'>: <unbound method SafeRepresenter.represent_float>, <type 'set'>: <unbound method SafeRepresenter.represent_set>, <class 'astropy.time.core.Time'>: <function _time_representer>, <type 'datetime.date'>: <unbound method SafeRepresenter.represent_date>, <type 'str'>: <unbound method SafeRepresenter.represent_str>, <type 'datetime.datetime'>: <unbound method SafeRepresenter.represent_datetime>, None: <unbound method SafeRepresenter.represent_undefined>, <type 'long'>: <unbound method SafeRepresenter.represent_long>, <type 'numpy.ndarray'>: <function _ndarray_representer>, <type 'dict'>: <unbound method SafeRepresenter.represent_dict>, <class 'astropy.units.core.CompositeUnit'>: <function _unit_representer>}¶
-