Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
kwant
kwant
Commits
68446fb4
Commit
68446fb4
authored
Aug 17, 2020
by
Anton Akhmerov
Committed by
Viacheslav Ostroukh
Jun 17, 2021
Browse files
linter error fixes
parent
bd41cfd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
kwant/kpm.py
View file @
68446fb4
...
@@ -326,8 +326,7 @@ class SpectralDensity:
...
@@ -326,8 +326,7 @@ class SpectralDensity:
if
energy_resolution
:
if
energy_resolution
:
if
energy_resolution
<=
0
:
if
energy_resolution
<=
0
:
raise
ValueError
(
"'energy_resolution' must be positive"
raise
ValueError
(
"'energy_resolution' must be positive"
)
.
format
(
energy_resolution
))
# factor of 1.6 comes from the fact that we use the
# factor of 1.6 comes from the fact that we use the
# Jackson kernel when calculating the FFT, which has
# Jackson kernel when calculating the FFT, which has
# maximal slope π/2. Rounding to 1.6 ensures that the
# maximal slope π/2. Rounding to 1.6 ensures that the
...
@@ -1097,7 +1096,7 @@ def jackson_kernel(moments):
...
@@ -1097,7 +1096,7 @@ def jackson_kernel(moments):
<https://arxiv.org/abs/cond-mat/0504627>`_.
<https://arxiv.org/abs/cond-mat/0504627>`_.
"""
"""
n_moments
,
*
extra_shape
=
moments
.
shape
n_moments
=
len
(
moments
)
m
=
np
.
arange
(
n_moments
)
m
=
np
.
arange
(
n_moments
)
kernel_array
=
((
n_moments
-
m
+
1
)
*
kernel_array
=
((
n_moments
-
m
+
1
)
*
np
.
cos
(
np
.
pi
*
m
/
(
n_moments
+
1
))
+
np
.
cos
(
np
.
pi
*
m
/
(
n_moments
+
1
))
+
...
@@ -1119,7 +1118,7 @@ def lorentz_kernel(moments, l=4):
...
@@ -1119,7 +1118,7 @@ def lorentz_kernel(moments, l=4):
The additional parameter ``l`` controls the decay of the kernel.
The additional parameter ``l`` controls the decay of the kernel.
"""
"""
n_moments
,
*
extra_shape
=
moments
.
shape
n_moments
=
len
(
moments
)
m
=
np
.
arange
(
n_moments
)
m
=
np
.
arange
(
n_moments
)
kernel_array
=
np
.
sinh
(
l
*
(
1
-
m
/
n_moments
))
/
np
.
sinh
(
l
)
kernel_array
=
np
.
sinh
(
l
*
(
1
-
m
/
n_moments
))
/
np
.
sinh
(
l
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment