From 71cad3a00cae93525324018fcb4ea314efaad2ed Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Tue, 16 Oct 2018 09:57:23 +0200 Subject: [PATCH] use raw strings in docstrings that contain backslashes For sequences such as '\d' and '\s' that are *not* escape sequences, this triggers a deprecation warning in recent versions of Python. --- kwant/kpm.py | 2 +- kwant/physics/noise.py | 2 +- kwant/solvers/common.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kwant/kpm.py b/kwant/kpm.py index 2c4ee432..21024c60 100644 --- a/kwant/kpm.py +++ b/kwant/kpm.py @@ -21,7 +21,7 @@ __all__ = ['SpectralDensity'] class SpectralDensity: - """Calculate the spectral density of an operator. + r"""Calculate the spectral density of an operator. This class makes use of the kernel polynomial method (KPM), presented in [1]_, to obtain the spectral density diff --git a/kwant/physics/noise.py b/kwant/physics/noise.py index de8d1334..b565885f 100644 --- a/kwant/physics/noise.py +++ b/kwant/physics/noise.py @@ -13,7 +13,7 @@ __all__ = ['two_terminal_shotnoise'] def two_terminal_shotnoise(smatrix): - """Compute the shot-noise in a two-terminal setup. + r"""Compute the shot-noise in a two-terminal setup. In a two terminal system the shot noise is given by `tr((1 - t*t^\dagger) * t*t^\dagger)`. diff --git a/kwant/solvers/common.py b/kwant/solvers/common.py index 57c6fd35..2c3f87a6 100644 --- a/kwant/solvers/common.py +++ b/kwant/solvers/common.py @@ -555,7 +555,7 @@ class SparseSolver(metaclass=abc.ABCMeta): def wave_function(self, sys, energy=0, args=(), check_hermiticity=True, *, params=None): - """ + r""" Return a callable object for the computation of the wave function inside the scattering region. -- GitLab