This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _lib / doccer / doc_replace

function

scipy._lib.doccer:doc_replace

source: build-install/usr/lib/python3.14/site-packages/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