dpnp.result_type
- dpnp.result_type(*arrays_and_dtypes)[source]
Returns the type that results from applying the NumPy type promotion rules to the arguments.
For full documentation refer to
numpy.result_type
.- Parameters:
arrays_and_dtypes (list of {dpnp.ndarray, usm_ndarray, dtype}) – An arbitrary length sequence of arrays or dtypes.
- Returns:
out – The result type.
- Return type:
Examples
>>> import dpnp as dp >>> a = dp.arange(3, dtype=dp.int64) >>> b = dp.arange(7, dtype=dp.int32) >>> dp.result_type(a, b) dtype('int64')
>>> dp.result_type(dp.int64, dp.complex128) dtype('complex128')
>>> dp.result_type(dp.ones(10, dtype=dp.float32), dp.float64) dtype('float64')