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
6fb5d56d
Commit
6fb5d56d
authored
Jun 24, 2021
by
Viacheslav Ostroukh
🚲
Browse files
Merge branch 'stable'
parents
2cac5a9a
0e398ff4
Pipeline
#97277
failed with stages
in 63 minutes and 52 seconds
Changes
1
Pipelines
42
Hide whitespace changes
Inline
Side-by-side
kwant/plotter.py
View file @
6fb5d56d
...
...
@@ -2061,8 +2061,8 @@ def _generate_spectrum(syst, params, mask, x, y):
h_p
=
np
.
atleast_2d
(
bound_ham
(
**
p
))
spectrum
.
append
(
np
.
linalg
.
eigvalsh
(
h_p
))
# massage masked grid points into a list of NaNs of the appropriate length
n
_eigvals
=
len
(
next
(
filter
(
lambda
s
:
s
is
not
None
,
spectrum
))
)
nan_list
=
[
np
.
nan
]
*
n_eigvals
shape
_eigvals
=
next
(
filter
(
lambda
s
:
s
is
not
None
,
spectrum
))
.
shape
nan_list
=
np
.
full
(
shape_eigvals
,
np
.
nan
)
spectrum
=
[
nan_list
if
s
is
None
else
s
for
s
in
spectrum
]
# make into a numpy array and reshape
new_shape
=
[
len
(
v
)
for
v
in
array_values
]
+
[
-
1
]
...
...
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