Skip to content

Commit

Permalink
Remove redundant code (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Apr 30, 2024
1 parent b295fbe commit d79fbfb
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions h5pyd/_hl/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,32 +189,6 @@ def make_new_dset(
layout = chunks
chunks = None

if isinstance(dtype, Datatype):
# Named types are used as-is
type_json = dtype.id.type_json
else:
# Validate dtype
if dtype is None:
dtype = numpy.dtype("=f4")
else:
dtype = numpy.dtype(dtype)

if dtype.kind == "O" and dtype.metadata and "ref" in dtype.metadata:
type_json = {}
type_json["class"] = "H5T_REFERENCE"
meta_type = dtype.metadata["ref"]
if meta_type is Reference:
type_json["base"] = "H5T_STD_REF_OBJ"
elif meta_type is RegionReference:
type_json["base"] = "H5T_STD_REF_DSETREG"
else:
errmsg = "Unexpected metadata type"
raise ValueError(errmsg)
else:
type_json = getTypeItem(dtype)
# tid = h5t.py_create(dtype, logical=1)
body["type"] = type_json

compressors = parent.id.http_conn.compressors

# Legacy
Expand Down

0 comments on commit d79fbfb

Please sign in to comment.