Skip to content

Commit 9fe6101

Browse files
committed
Fix Bug
1 parent 9e591a0 commit 9fe6101

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ requires-python = ">=3.11"
2020
dependencies = [
2121
"pyhdf >= 0.10.5",
2222
"netcdf4 >= 1.6.5",
23-
"numpy >= 1.26.0",
23+
"numpy >= 1.23.0",
2424
]
2525
dynamic = ["version"]
2626

src/mtmhdf/_hdf5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class HDF5(Dataset):
44
@staticmethod
55
def open(file_path:str, mode='r', *args, **kwargs):
6-
return Dataset(file_path, mode=HDF5.OPENMODES[mode], *args, **kwargs)
6+
return Dataset(file_path, mode=mode, *args, **kwargs)
77

88
@staticmethod
99
def read(fp:Dataset, name:str) -> Variable:
@@ -17,7 +17,7 @@ def keys(fp:Dataset) -> list[str]:
1717
def dpinfo(dp: Variable) -> dict:
1818
info_dict = dp.__dict__
1919
info_dict.update({
20-
"dataset_name": dp.group().path + "/" + dp.name,
20+
"dataset_name": (dp.group().path + "/" + dp.name).replace("//", "/"),
2121
"dataset_dims": dp.shape,
2222
"dataset_type": dp.datatype.name
2323
})

src/mtmhdf/reader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import numpy as np
33
import numpy.ma as ma
44

5-
from _hdf4 import HDF4
6-
from _hdf5 import HDF5
5+
from ._hdf4 import HDF4
6+
from ._hdf5 import HDF5
77

8-
from _utils import int2binarystring, bitoffset, scale, mask
8+
from ._utils import int2binarystring, bitoffset, scale, mask
99

1010

1111
class TemplateData:

0 commit comments

Comments
 (0)