create_composite_dtype

halotools.empirical_models.create_composite_dtype(dtype_list)[source] [edit on github]

Find the union of the dtypes in the input list, and return a composite dtype after verifying consistency of typing of possibly repeated fields.

Parameters:

dtype_list : list

List of dtypes with possibly repeated field names.

Returns:

composite_dtype : dtype

Numpy dtype object composed of the union of the input dtypes.

Notes

Basically an awkward workaround to the fact that numpy dtype objects are not iterable.