On Sat, Feb 13, 2010 at 9:53 PM, Pierre GM <pgmdevl...@gmail.com> wrote:
> On Feb 13, 2010, at 11:56 PM, David Goldsmith wrote: > > > > > > Please don't misinterpret my statements to mean that I think this isn't > important and/or that you should feel solely responsible for a fix - I > sincerely just wanted to uncover the nature and extent of the problem. > Unfortunately, I still feel like I don't really understand the functional > origin of the problem, otherwise I'd be the first to be offering to help - > perhaps if you can explain to me what you think is happening... > > In a nutshell: > some functions in numpy.ma (like np.ma.compress) are actually instances of > a factory class (_frommethod). This class implements a __call__ method, so > its instances behave like functions. In practice, they just call a method of > MaskedArray. Anyway, the __doc__ of the instance is created from the > docstring of the corresponding method with _frommethod.getdoc. I'm sure > that's where we can improve things (like substistute `self `by `a`. > Because it's an instance, help(numpy.ma.compress) gives the docstring of > numpy.ma._frommethod instead. In IPython, numpy.ma.compress? gives you the > doc, twice (I don't get why). > Excellent, thanks Pierre: w/ this in the thread, if I can't help (I'm no expert on factory classes, nor, certainly, on the why's and wherefore's of iPython) I'm all but certain we have the communal know-how to get this taken care of quickly. One final request, though, if I may: perhaps you could make the issue "official" by filing a ticket? Thanks again! DG PS: I can certainly take a look at _frommethod.getdoc and see what I can do with that... > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion