Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 808 Bytes

Samples.to.md

File metadata and controls

37 lines (24 loc) · 808 Bytes

Samples.to (function)

def to(self, unit, strip_units=False)

Convert to different units. This creates a copy and returns the new distribution with the new units. Astropy is required in order to set and/or use units.

See also:

Arguments

  • unit (astropy.unit object): unit to use in the new distribution. The current units (see Samples.unit) must be able to convert to the requested units.
  • strip_units (bool, optional, default=False): whether to strip the units from the returned object

Returns

  • the new distribution object

Raises

  • ImportError: if astropy dependency is not met.