Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve maxshape for Dataset #56

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Retrieve maxshape for Dataset #56

merged 2 commits into from
Feb 28, 2024

Conversation

bmaranville
Copy link
Collaborator

retrieving maxshape from dataobjects and exposing maxshape property on Dataset

closes #50

@@ -648,6 +657,8 @@ def is_dataset(self):
""" True when DataObjects points to a dataset, False for a group. """
return len(self.find_msg_type(DATASPACE_MSG_TYPE)) > 0

UNLIMITED_SIZE = struct.unpack('<Q', b'\xff\xff\xff\xff\xff\xff\xff\xff')[0]

Choose a reason for hiding this comment

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

easier written (1 << 64) - 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair enough :) this was copy-paste from some earlier code, which has since been refactored to be

UNDEFINED_ADDRESS = 0xffffffffffffffff

(https://github.com/jjhelmus/pyfive/blob/master/pyfive/core.py#L10), which could also be re-used here as a constant.

@jjhelmus
Copy link
Owner

The use of determine_data_shape on line 183 will also need to be updated with the new return type

…om existing UNDEFINED_ADDRESS, as they have the same value
@jjhelmus
Copy link
Owner

LGTM, thanks for the PR

@jjhelmus jjhelmus merged commit 7801a56 into master Feb 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

maxshape-attribute missing on datasets
3 participants