torch_ecg.utils.add_docstring

torch_ecg.utils.add_docstring(doc: str, mode: str = 'replace') Callable[source]

Decorator to add docstring to a function or a class.

Parameters:
  • doc (str) – The docstring to be added.

  • mode ({"replace", "append", "prepend"}, optional) – The mode of the adding to the original docstring, by default “replace”, case insensitive.