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_dtypeslist of {dpnp.ndarray, usm_ndarray, dtype}
An arbitrary length sequence of arrays or dtypes.
- Returns:
- outdtype
The result type.
Examples
>>> import dpnp as np >>> a = np.arange(3, dtype=np.int64) >>> b = np.arange(7, dtype=np.int32) >>> np.result_type(a, b) dtype('int64')
>>> np.result_type(np.int64, np.complex128) dtype('complex128')
>>> np.result_type(np.ones(10, dtype=np.float32), np.float64) dtype('float64')