Skip to main content
`Ctrl`+`K`

# numpy.result_type

numpy.result_type(*arrays_and_dtypes)

  Returns the type that results from applying the NumPy type promotion rules to the arguments.

  Parameters:
    arrays_and_dtypes list of arrays and dtypes

      The operands of some operation whose result type is needed.

  Returns:
    out dtype

      The result type.

  See also

  `dtype`, `promote_types`, `min_scalar_type`, `can_cast`

  Examples

      >>> import numpy as np
      >>> np.result_type(3, np.arange(7, dtype=np.int8))
      dtype('int8')

      >>> np.result_type(np.int32, np.complex64)
      dtype('complex128')

      >>> np.result_type(3.0, -2)
      dtype('float64')