Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Wimmer
kwant
Commits
0a6e59f1
Commit
0a6e59f1
authored
11 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
catch scipy 0.9 bug in tutorial example
parent
fc95c71c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/source/tutorial/closed_system.py
+16
-8
16 additions, 8 deletions
doc/source/tutorial/closed_system.py
with
16 additions
and
8 deletions
doc/source/tutorial/closed_system.py
+
16
−
8
View file @
0a6e59f1
...
...
@@ -99,14 +99,22 @@ def main():
# Finalize the system.
sys
=
sys
.
finalized
()
# We should observe energy levels that flow towards Landau
# level energies with increasing magnetic field
plot_spectrum
(
sys
,
[
iB
*
0.002
for
iB
in
xrange
(
100
)])
# Plot an eigenmode of a circular dot. Here we create a larger system for
# better spatial resolution.
sys
=
make_system
(
r
=
30
).
finalized
()
plot_wave_function
(
sys
)
# The following try-clause can be removed once SciPy 0.9 becomes uncommon.
try
:
# We should observe energy levels that flow towards Landau
# level energies with increasing magnetic field.
plot_spectrum
(
sys
,
[
iB
*
0.002
for
iB
in
xrange
(
100
)])
# Plot an eigenmode of a circular dot. Here we create a larger system for
# better spatial resolution.
sys
=
make_system
(
r
=
30
).
finalized
()
plot_wave_function
(
sys
)
except
ValueError
as
e
:
if
e
.
message
==
"
Input matrix is not real-valued.
"
:
print
"
The calculation of eigenvalues failed because of a bug in SciPy 0.9.
"
print
"
Please upgrade to a newer version of SciPy.
"
else
:
raise
# Call the main function if the script gets executed (as opposed to imported).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment