result_type#

rbc.stdlib.data_type_functions.result_type(*arrays_and_dtypes)#

Returns the dtype that results from applying the type promotion rules (see Type Promotion Rules) to the arguments.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('TextEncodingNone(int16[], float32[])')
... def array_api_result_type(a, b):
...     t = array_api.result_type(a, b)
...     return TextEncodingNone(str(t))
>>> a = np.arange(5, dtype=np.int16)
>>> b = np.arange(5, dtype=np.float32)
>>> array_api_result_type(a, b).execute()
'float32'

Array-API ‘result_type’ doc