fatf.utils.array.tools.generalise_dtype

fatf.utils.array.tools.generalise_dtype(dtype_one: numpy.dtype, dtype_two: numpy.dtype) → numpy.dtype[source]

Finds the more general type of the two given.

Parameters
dtype_onenumpy.dtype

The first dtype to be compared.

dtype_twonumpy.dtype

The second dtype to be compared.

Returns
common_dtypenumpy.dtype

The more general type of the two given as the input parameters.

Raises
ValueError

Either of the input dtypes is not a base dtype: either textual or numerical type.