Skip to content

Commit dd90a06

Browse files
committed
Increase atol
1 parent 13b7861 commit dd90a06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

omf/fileio/geoh5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def collect_attributes(
555555
ndvs = np.isnan(values)
556556

557557
if np.allclose(
558-
values[~ndvs].astype(np.int32), values[~ndvs], atol=1e-45
558+
values[~ndvs].astype(np.int32), values[~ndvs], atol=2e-45
559559
):
560560
values[ndvs] = INTEGER_NDV
561561
values = values.astype(np.int32)
@@ -566,7 +566,7 @@ def collect_attributes(
566566
values = getattr(element, "values", None)
567567

568568
if np.issubdtype(values.dtype, np.floating):
569-
values[np.isclose(values, FLOAT_NDV, atol=1e-45)] = np.nan
569+
values[np.isclose(values, FLOAT_NDV, atol=2e-45)] = np.nan
570570
else:
571571
# Convert to float with nan as no-data value not supporter by OMF
572572
ndvs = np.isclose(values, INTEGER_NDV)

0 commit comments

Comments
 (0)