{ } Raw JSON

bundles / scipy 1.17.1 / 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 : object

A class or object whose docstring will be used as the basis for the replacement operation.

oldval : str

The string to search for in the docstring.

newval : str

The string to replace oldval with in the docstring.

Returns

decfunc : function

A decorator function that replaces occurrences of oldval with newval in the docstring of the decorated function.

Aliases

  • scipy.signal._filter_design.doccer.doc_replace