bundles / scipy latest / scipy / _lib / doccer / doc_replace
function
scipy._lib.doccer:doc_replace
source: /scipy/_lib/doccer.py :338
Signature
def doc_replace ( obj : object , oldval : str , newval : str ) → Decorator Summary
Decorator to take the docstring from obj, with oldval replaced by newval
Extended Summary
Equivalent to func.__doc__ = obj.__doc__.replace(oldval, newval)
Parameters
obj: objectA class or object whose docstring will be used as the basis for the replacement operation.
oldval: strThe string to search for in the docstring.
newval: strThe string to replace
oldvalwith in the docstring.
Returns
decfunc: functionA decorator function that replaces occurrences of
oldvalwithnewvalin the docstring of the decorated function.
Aliases
-
scipy.signal._filter_design.doccer.doc_replace