[ Web Proxy ]
URL:
Viewing: https://numpy.org/doc/stable/reference/generated/../random/../generated/numpy.ufunc.nargs.html [Back]  [Original]

numpy.ufunc.nargs — NumPy v2.5 Manual
Back to top
Search the docs ...:

numpy.ufunc.nargs#

attribute

ufunc.nargs#

The number of arguments.

Data attribute containing the number of arguments the ufunc takes, including optional ones.

Notes

Typically this value will be one more than what you might expect because all ufuncs take the optional out argument.

Examples

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

Web Proxy Viewer  |  New URL  |  Original Page