Skip to content

Commit

Permalink
TL: allowed ndarray.dtype for FieldsIO arg
Browse files Browse the repository at this point in the history
  • Loading branch information
tlunet committed Jan 18, 2025
1 parent 4f94845 commit aaf4cdd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pySDC/helpers/fieldsIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,13 @@ def __init__(self, dtype, fileName):
fileName : str
File.
"""
assert dtype in DTYPES_AVAIL, f"{dtype=} not available"
self.dtype = dtype
avail = False
for key in DTYPES_AVAIL:
if key == dtype:
self.dtype = key
avail = True
break
assert avail, f"{dtype=} not available"
self.fileName = fileName
self.initialized = False

Expand Down

0 comments on commit aaf4cdd

Please sign in to comment.