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='i1'))
      dtype('int8')

      >>> np.result_type('i4', 'c8')
      dtype('complex128')

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