Skip to content

Commit

Permalink
Futher fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Apr 22, 2024
1 parent eb3f6f1 commit 43ff99e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions electronicparsers/abinit/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def init_quantities(self):

self._quantities.append(
Quantity(
'input_vars',
'input_variables',
r'\-outvars: echo values of preprocessed input variables \-+([\s\S]+?)\={10}',
repeats=False,
sub_parser=TextParser(
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def input_vars(self):
]
}

for key_val in self.get('input_vars', {}).get('key_value', []):
for key_val in self.get('input_variables', {}).get('key_value', []):
key, n_dataset = re.search(r'(\D+)?(\d*)', key_val[0]).groups()
self._input_vars.setdefault(key, [None] * self.n_datasets)

Expand All @@ -1148,7 +1148,12 @@ def input_vars(self):
if '-' in key_val: # exception when the next line starts with -
key_val = key_val[:-1]

val = np.array(key_val[1:], dtype=m_quantity.type.standard_type())
val = np.array(
key_val[1:],
dtype=m_quantity.type.standard_type()
if hasattr(m_quantity.type, 'standard_tpye')
else m_quantity.type,
)
if not m_quantity.shape:
val = val[0]
if n_dataset:
Expand Down

0 comments on commit 43ff99e

Please sign in to comment.