numpy/numpy — pull request #3149 by WarrenWeckesser (2013-03-15 18:13:43+00:00)
Title: ENH: ufunc: Add an attribute to the ufunc that enables the autogeneration of the function signature in the docstring.

This PR adds a flag to the ufunc so that the automatic generation of the function signature in the docstring can be disabled. This will allow a library such as scipy to give a signature in the docstring that has more meaning variable names, without having a duplicate signature with just 'x' or 'x1, x2' as the variable names.

For example:

In [6]: print np.arctan2.__doc__[:90]
arctan2(x1, x2[, out])

Element-wise arc tangent of ``x1/x2`` choosing the quadrant correc

In [7]: np.arctan2.autogen_docstring_sig = False

In [8]: print np.arctan2.__doc__[:90]
Element-wise arc tangent of ``x1/x2`` choosing the quadrant correctly.

The quadrant (i.e.

In [9]:

Here's the issue that came up in a scipy pull request that motivated this change: https://github.com/scipy/scipy/pull/459#issuecomment-14543536