MCPcopy Index your code
hub / github.com/numpy/numpy / _add_docstring

Function _add_docstring

numpy/_core/function_base.py:474–487  ·  view source on GitHub ↗
(obj, doc, warn_on_python)

Source from the content-addressed store, hash-verified

472
473
474def _add_docstring(obj, doc, warn_on_python):
475 if warn_on_python and not _needs_add_docstring(obj):
476 warnings.warn(
477 f"add_newdoc was used on a pure-python object {obj}. "
478 "Prefer to attach it directly to the source.",
479 UserWarning,
480 stacklevel=3)
481
482 doc = inspect.cleandoc(doc)
483
484 try:
485 add_docstring(obj, doc)
486 except Exception:
487 pass
488
489
490def add_newdoc(place, obj, doc, warn_on_python=True):

Callers 1

add_newdocFunction · 0.85

Calls 1

_needs_add_docstringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…