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

Function _add_docstring

numpy/core/function_base.py:483–494  ·  view source on GitHub ↗
(obj, doc, warn_on_python)

Source from the content-addressed store, hash-verified

481
482
483def _add_docstring(obj, doc, warn_on_python):
484 if warn_on_python and not _needs_add_docstring(obj):
485 warnings.warn(
486 "add_newdoc was used on a pure-python object {}. "
487 "Prefer to attach it directly to the source."
488 .format(obj),
489 UserWarning,
490 stacklevel=3)
491 try:
492 add_docstring(obj, doc)
493 except Exception:
494 pass
495
496
497def add_newdoc(place, obj, doc, warn_on_python=True):

Callers 1

add_newdocFunction · 0.85

Calls 2

_needs_add_docstringFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected