MCPcopy Create free account
hub / github.com/numpy/numpy / getdoc

Method getdoc

numpy/ma/extras.py:237–257  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

__init__Method · 0.95

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected