Return more capable float type of first and second
Return default if neither of first or second is a float
Parameters: | first : numpy type specifier
second : numpy type specifier
default : numpy type specifier, optional
|
---|---|
Returns: | better_type : numpy type
|
Examples
>>> better_float_of(np.float32, np.float64) is np.float64
True
>>> better_float_of(np.float32, 'i4') is np.float32
True
>>> better_float_of('i2', 'u4') is np.float32
True
>>> better_float_of('i2', 'u4', np.float64) is np.float64
True