bundles / numpy 2.4.4 / 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 dtypesThe operands of some operation whose result type is needed.
Returns
out: dtypeThe 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