DOC: Incorrect description of in-place operations
Issue with current documentation:
https://numpy.org/devdocs/reference/generated/numpy.ndarray.iadd.html
In the documentation for in-place operations (__iadd__, __isub__, etc.), it states "Return self+=value." However, an in-place operation (self+=value) is a statement, not an expression, so it does not have a return value.
Idea or request for content:
The description should be same as self+=value, perform self+=value or something similar.
The docstring is indeed not very clear, but the __iadd__ operator does actually return an array; it is just that value is added in-place and then self is returned:
In [2]: a = np.arange(5.0)
In [3]: a.__iadd__(1)
Out[3]: array([1., 2., 3., 4., 5.])
In [4]: a
Out[4]: array([1., 2., 3., 4., 5.])
What I am pointing out is not whether __iadd__ returns a value, but whether it is appropriate to express the return value as self+=value. At least in the Python language, return self+=value is not syntactically correct.