跳到内容

result_type

返回将 NumPy 类型提升规则应用于参数后产生的类型。

另请参阅

numpy.result_type : NumPy 等效函数

源代码位于 sparse/numba_backend/_coo/common.py
979
980
981
982
983
984
985
986
987
def result_type(*arrays_and_dtypes):
    """Returns the type that results from applying the NumPy type promotion rules to the
    arguments.

    See Also
    --------
    [`numpy.result_type`][] : The NumPy equivalent
    """
    return np.result_type(*(_as_result_type_arg(x) for x in arrays_and_dtypes))