data_info_factory¶
-
astropy.utils.data_info.
data_info_factory
(names, funcs)[source] [edit on github]¶ Factory to create a function that can be used as an
option
for outputting data object summary information.Parameters: - names : list
List of information attribute names
- funcs : list
List of functions that compute the corresponding information attribute
Returns: - func : function
Function that can be used as a data info option
Examples
>>> from astropy.utils.data_info import data_info_factory >>> from astropy.table import Column >>> c = Column([4., 3., 2., 1.]) >>> mystats = data_info_factory(names=['min', 'median', 'max'], ... funcs=[np.min, np.median, np.max]) >>> c.info(option=mystats) min = 1.0 median = 2.5 max = 4.0 n_bad = 0 length = 4