Skip to content

Commit fb0a81e

Browse files
committed
Take dimension from TB model in tb.System
1 parent 56e532a commit fb0a81e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

z2pack/tb.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class System(_HmSystem):
2121
2222
:param kwargs: Keyword arguments passed to :class:`.hm.System`.
2323
24-
The ``pos`` and ``bands`` keywords of :class:`.hm.System` are determined from the ``tb_model`` unless otherwise specified.
24+
The ``pos``, ``bands`` and ``dim`` keywords of :class:`.hm.System` are determined from the ``tb_model`` unless otherwise specified.
2525
"""
2626

2727
def __init__(self, tb_model, **kwargs):
@@ -30,6 +30,10 @@ def __init__(self, tb_model, **kwargs):
3030
convention=2,
3131
**ChainMap(
3232
kwargs,
33-
dict(pos=copy.deepcopy(tb_model.pos), bands=tb_model.occ)
33+
dict(
34+
pos=copy.deepcopy(tb_model.pos),
35+
bands=tb_model.occ,
36+
dim=tb_model.dim
37+
)
3438
)
3539
)

0 commit comments

Comments
 (0)