astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Units and Quantities (`astropy.units`) »
- Generic

# Generic

class astropy.units.format.Generic(*args, **kwargs)

  Bases: `Base`

  A “generic” format.

  The syntax of the format is based directly on the FITS standard, but instead of only supporting the units that FITS knows about, it supports any unit available in the `astropy.units` namespace.

  Attributes Summary

  `name` |

  Methods Summary

  `parse`(s[, debug]) | Convert a string to a unit object.
  `to_string`(unit) | Convert a unit object to a string.

  Attributes Documentation

  name = 'generic'

  Methods Documentation

  classmethod parse(s, debug=False)

    Convert a string to a unit object.

  classmethod to_string(unit)

    Convert a unit object to a string.