Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_dataset(h_node):
""" Load a dataset, converting into its correct python type
Args:
h_node (h5py dataset): h5py dataset object to read
Returns:
data: reconstructed python object from loaded data
"""
py_type = get_type(h_node)
try:
load_fn = load_dataset_lookup(py_type)
return load_fn(h_node)
except:
raise
#raise RuntimeError("Hickle type %s not understood." % py_type)