Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
kwant
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
113
Issues
113
List
Boards
Labels
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
kwant
Commits
2f078c26
Commit
2f078c26
authored
Jul 19, 2019
by
Joseph Weston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provide clearer error message when a Builder is passed to plot_2d_bands
Closes #196.
parent
4fcc45d7
Pipeline
#20074
passed with stages
in 39 minutes and 8 seconds
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
kwant/wraparound.py
kwant/wraparound.py
+5
-1
No files found.
kwant/wraparound.py
View file @
2f078c26
...
...
@@ -362,10 +362,14 @@ def plot_2d_bands(syst, k_x=31, k_y=31, params=None,
if
not
hasattr
(
syst
,
'_wrapped_symmetry'
):
raise
TypeError
(
"Expecting a system that was produced by "
"'kwant.wraparound.wraparound'."
)
if
not
isinstance
(
syst
,
system
.
F
initeSystem
):
if
isinstance
(
syst
,
system
.
Inf
initeSystem
):
msg
=
(
"All symmetry directions must be wrapped around: specify "
"'keep=None' when calling 'kwant.wraparound.wraparound'."
)
raise
TypeError
(
msg
)
if
isinstance
(
syst
,
builder
.
Builder
):
msg
=
(
"Expecting a finalized system: remember to finalize your "
"system with 'syst.finalized()'."
)
raise
TypeError
(
msg
)
params
=
params
or
{}
lat_ndim
,
space_ndim
=
syst
.
_wrapped_symmetry
.
periods
.
shape
...
...
Write
Preview
Markdown
is supported
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