numpy.ufunc.nargs# attribute ufunc.nargs# 参数的数量. 包含 ufunc 接受的参数数量(包括可选参数)的数据属性. 注释 通常,此值将比您预期的值大 1,因为所有 ufunc 都采用可选的“out”参数. 示例 Try it in your browser! >>> import numpy as np >>> np.add.nargs 3 >>> np.multiply.nargs 3 >>> np.power.nargs 3 >>> np.exp.nargs 2 Go BackOpen In Tab