Skip to content
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions pysaliency/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _load_attribute_dict_from_hdf5(attribute_group):
json_attributes = json_attributes.decode('utf8')
__attributes__ = json.loads(json_attributes)

attributes = {attribute: load_hdf5_dataset(attribute_group, attribute) for attribute in __attributes__}
attributes = {attribute: attribute_group[attribute][...] for attribute in __attributes__}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_hdf5_dataset should handle string attributes. Removing it will fail to load string attributes. There is a test for this, which is now failing (For some reason, the tests didn't run automatically here, but I needed to trigger them)

return attributes


Expand Down Expand Up @@ -122,4 +122,4 @@ def concatenate_attributes(attributes):
padded_attributes.append(np.hstack((a, padding)))
else:
padded_attributes.append(a)
return np.vstack(padded_attributes)
return np.vstack(padded_attributes)
Loading