Skip to content

Commit

Permalink
ensure NaN stress is not written
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenhaute committed Jul 20, 2024
1 parent 00bf5e4 commit e215ceb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions psiflow/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ def to_string(self) -> str:
values_dict = {}
for key in keys:
value = getattr(self, key)
if value is not None:
values_dict[key] = value
if value is None:
continue
if value is np.ndarray:
if np.all(np.isnan(value)):
continue
values_dict[key] = value
for key, value in self.order.items():
values_dict["order_" + key] = value
comment += key_val_dict_to_str(values_dict)
Expand Down

0 comments on commit e215ceb

Please sign in to comment.