This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / result_type

_ArrayFunctionDispatcher

numpy:result_type

Signature

def   result_type ( * arrays_and_dtypes )

Summary

Returns the type that results from applying the NumPy type promotion <arrays.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.

Examples

import numpy as np
np.result_type(3, np.arange(7, dtype='i1'))
np.result_type('i4', 'c8')
np.result_type(3.0, -2)

See also

can_cast
dtype
min_scalar_type
promote_types

Aliases

  • numpy.result_type

Referenced by