Numpy doc.ufuncs?

In numpy docs (say for np.any there ), you can see

See doc.ufuncs for more information (Output Arguments section).

But where to look for doc.ufuncs ??

+4
source share
1 answer

Based on the link to Section "Output arguments" it seems that the documents are referencing numpy.docs.ufuncs :

Output Arguments

All ufuncs accept an optional output array. The array should be the expected output form. Remember that if the type of the output array is of a different (and lower) type than the output result, the results may be silently truncated or otherwise corrupted to a lower type. This use is useful when you want to avoid creating large temporary arrays and instead allows you to reuse the same array repeatedly (due to the inability to use the more convenient operator notation in expressions). Note that when the output argument, ufunc still returns a link to the result.

 >>> x = np.arange(2) >>> np.add(np.arange(2),np.arange(2.),x) array([0, 2]) >>> x array([0, 2]) 

This file may not be in your basic numpy installation. On Ubuntu, you need to install the python-numpy-doc package .

+3
source

All Articles