On Fri, Mar 15, 2013 at 9:19 PM, Pauli Virtanen <pav@iki.fi> wrote:
15.03.2013 22:39, Nathaniel Smith kirjoitti: [clip]
- Something else...
How about: scrap the automatic signatures altogether, and directly use the docstring provided to the ufunc creation function?
I suspect ufuncs are not very widely used in 3rd party code, as it requires somewhat tricky messing with the C API. The backwards compatibility issue is also just a documentation issue, so nothing drastic.
True enough. I guess a question is how much it bothers us that there are tons of ufunc arguments that are just not mentioned in the interpreter docstrings: http://docs.scipy.org/doc/numpy/reference/ufuncs.html#optional-keyword-argum... Obviously not a huge amount of we'd have altered the auto-generation already to include them :-) But IMHO it would be kind of nice if ?np.add mentioned the existence of things like where= and dtype=... and if we decide that docstrings ought to mention such things, then it's going to be a right hassle updating them all by hand every time some new ufunc feature is added. -n