Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Kelvin Loh
kwant
Commits
df53ffe4
Commit
df53ffe4
authored
5 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
update test that vectorization requires norbs to test infinite systems
parent
dd4f537e
No related branches found
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_builder.py
+8
-4
8 additions, 4 deletions
kwant/tests/test_builder.py
with
8 additions
and
4 deletions
kwant/tests/test_builder.py
+
8
−
4
View file @
df53ffe4
...
...
@@ -740,15 +740,19 @@ def test_vectorized_hamiltonian_evaluation():
)
def
test_vectorized_requires_norbs
():
@pytest.mark.parametrize
(
"
sym
"
,
[
builder
.
NoSymmetry
(),
kwant
.
TranslationalSymmetry
([
-
1
]),
])
def
test_vectorized_requires_norbs
(
sym
):
# Catch deprecation warning for lack of norbs
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"
ignore
"
)
fam
=
builder
.
SimpleSiteFamily
()
lat
=
kwant
.
lattice
.
chain
()
syst
=
builder
.
Builder
(
vectorize
=
True
)
syst
[
fam
(
0
,
0
)]
=
1
syst
=
builder
.
Builder
(
sym
,
vectorize
=
True
)
syst
[
lat
(
0
)]
=
1
raises
(
ValueError
,
syst
.
finalized
)
...
...
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