numpy.find_common_type

numpy.find_common_type(array_types, scalar_types)

Determine common type following standard coercion rules

Parameters:

array_types : sequence

A list of dtype convertible objects representing arrays

scalar_types : sequence

A list of dtype convertible objects representing scalars

Returns:

datatype : dtype

The common data-type which is the maximum of the array_types ignoring the scalar_types unless the maximum of the scalar_types is of a different kind.

If the kinds is not understood, then None is returned.

See also

dtype

Previous topic

numpy.issubclass

Next topic

numpy.typename

This Page

Quick search