Skip to content

Commit 5b968ae

Browse files
authored
Fix dropped skims (#56)
* allow ignoring skims * update min numba * add tests and doc for ignore * shared memory pre-init * non-dask reload of data * improved logging * log bytes loaded so far * fix bug * docs and tests * fix dropped skims
1 parent 05c3ce9 commit 5b968ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sharrow/dataset.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import re
88
import time
99
from collections.abc import Hashable, Iterable, Mapping, Sequence
10+
from pathlib import Path
1011
from typing import TYPE_CHECKING, Any
1112

1213
import numpy as np
@@ -615,7 +616,7 @@ def reload_from_omx_3d(
615616
use_file_handles = []
616617
opened_file_handles = []
617618
for filename in omx:
618-
if isinstance(filename, str):
619+
if isinstance(filename, (str, Path)):
619620
import openmatrix
620621

621622
h = openmatrix.open_file(filename)
@@ -642,6 +643,11 @@ def reload_from_omx_3d(
642643

643644
if time_period_sep in data_name:
644645
data_name_x, data_name_t = data_name.split(time_period_sep, 1)
646+
if data_name_x not in dataset:
647+
logger.info(
648+
f"skipping {data_name} because {data_name_x} not in dataset"
649+
)
650+
continue
645651
if len(dataset[data_name_x].dims) != 3:
646652
raise ValueError(
647653
f"dataset variable {data_name_x} has "

0 commit comments

Comments
 (0)