Retrieve the docstring and signature from the function. The ``__doc__`` attribute of the function is used as the docstring for the new masked array version of the function. A note on application of the function to the mask is appended. Parameters --
(self)
| 235 | self.__doc__ = self.getdoc() |
| 236 | |
| 237 | def getdoc(self): |
| 238 | """ |
| 239 | Retrieve the docstring and signature from the function. |
| 240 | |
| 241 | The ``__doc__`` attribute of the function is used as the docstring for |
| 242 | the new masked array version of the function. A note on application |
| 243 | of the function to the mask is appended. |
| 244 | |
| 245 | Parameters |
| 246 | ---------- |
| 247 | None |
| 248 | |
| 249 | """ |
| 250 | npfunc = getattr(np, self.__name__, None) |
| 251 | doc = getattr(npfunc, '__doc__', None) |
| 252 | if doc: |
| 253 | sig = self.__name__ + ma.get_object_signature(npfunc) |
| 254 | doc = ma.doc_note(doc, "The function is applied to both the _data " |
| 255 | "and the _mask, if any.") |
| 256 | return '\n\n'.join((sig, doc)) |
| 257 | return |
| 258 | |
| 259 | def __call__(self, *args, **params): |
| 260 | pass |