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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Joseph Weston
kwant
Commits
9e400599
Commit
9e400599
authored
5 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
provide "shape" and "format" to empty Qsymm models as required by 1.2
Not providing these is now deprecated. Close #325.
parent
7663844b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#23006
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kwant/qsymm.py
+2
-2
2 additions, 2 deletions
kwant/qsymm.py
with
2 additions
and
2 deletions
kwant/qsymm.py
+
2
−
2
View file @
9e400599
...
...
@@ -68,8 +68,8 @@ def builder_to_model(syst, momenta=None, real_space=True,
is used in finalized kwant systems.
"""
def
term_to_model
(
d
,
par
,
matrix
):
if
np
.
allclose
(
matrix
,
0
):
result
=
BlochModel
({})
if
allclose
(
matrix
,
0
):
result
=
BlochModel
({}
,
shape
=
matrix
.
shape
,
format
=
np
.
ndarray
)
else
:
result
=
BlochModel
({
BlochCoeff
(
d
,
qsymm
.
sympify
(
par
)):
matrix
},
momenta
=
momenta
)
...
...
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