QuantityInfo

class astropy.units.QuantityInfo(bound=False)[source]

Bases: astropy.units.quantity.QuantityInfoBase

Container for meta information like name, description, format. This is required when the object is used as a mixin column within a table, but can be used as a general way to store meta information.

Methods Summary

new_like(self, cols, length[, …])

Return a new Quantity instance which is consistent with the input cols and has length rows.

Methods Documentation

new_like(self, cols, length, metadata_conflicts='warn', name=None)[source]

Return a new Quantity instance which is consistent with the input cols and has length rows.

This is intended for creating an empty column object whose elements can be set in-place for table operations like join or vstack.

Parameters
colslist

List of input columns

lengthint

Length of the output column object

metadata_conflictsstr (‘warn’|’error’|’silent’)

How to handle metadata conflicts

namestr

Output column name

Returns
colQuantity (or subclass)

Empty instance of this class consistent with cols