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
2a9a4ffb
Commit
2a9a4ffb
authored
5 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
prefer explicit 'allclose' to equality checking
__eq__ for Models just uses allclose anyway.
parent
a5cb1ac1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kwant/tests/test_qsymm.py
+3
-3
3 additions, 3 deletions
kwant/tests/test_qsymm.py
with
3 additions
and
3 deletions
kwant/tests/test_qsymm.py
+
3
−
3
View file @
2a9a4ffb
...
...
@@ -286,7 +286,7 @@ def test_inverse_transform():
# Convert it back
ham2
=
builder_to_model
(
syst
)
# Check that it's the same as the original
assert
fam
==
ham2
assert
fam
.
allclose
(
ham2
)
# Check that the Hamiltonians are identical at random points in the Brillouin zone
sysw
=
kwant
.
wraparound
.
wraparound
(
syst
).
finalized
()
...
...
@@ -378,8 +378,8 @@ def test_consistency_kwant():
Ham1
=
builder_to_model
(
model_syst
,
momenta
=
Ham
.
momenta
)
# From the pure Kwant builder
Ham2
=
builder_to_model
(
kwant_syst
,
momenta
=
Ham
.
momenta
)
assert
Ham
==
Ham1
assert
Ham
==
Ham2
assert
Ham
.
allclose
(
Ham1
)
assert
Ham
.
allclose
(
Ham2
)
def
test_find_builder_discrete_symmetries
():
...
...
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