Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
tgt_dt = h5py.special_dtype(ref=h5py.RegionReference)
else:
msg = "Unexpected ref type: {}".format(srcdt)
logging.error(msg)
raise TypeError(msg)
elif srcdt.metadata and 'vlen' in srcdt.metadata:
src_vlen = srcdt.metadata['vlen']
if isinstance(src_vlen, np.dtype):
tgt_base = convert_dtype(src_vlen, ctx)
else:
tgt_base = src_vlen
if is_h5py(ctx['fout']):
tgt_dt = h5py.special_dtype(vlen=tgt_base)
else:
tgt_dt = h5pyd.special_dtype(vlen=tgt_base)
else:
tgt_dt = srcdt
return tgt_dt