Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/boututils/datafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

"""

import pathlib

import numpy as np

from boututils.boutarray import BoutArray
Expand Down Expand Up @@ -90,7 +92,8 @@ def __init__(
- NETCDF4 and NETCDF4_CLASSIC use HDF5 as the disk format
"""
if filename is not None:
if filename.split(".")[-1] in ("hdf5", "hdf", "h5"):
filename = pathlib.Path(filename)
if filename.suffix in ("hdf5", "hdf", "h5"):
Comment thread
ZedThree marked this conversation as resolved.
Outdated
self.impl = DataFile_HDF5(
filename=filename, write=write, create=create, format=format
)
Expand Down
Loading