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

Ancil var strict #6

Closed
wants to merge 2 commits into from
Closed

Conversation

pp-mo
Copy link

@pp-mo pp-mo commented Oct 22, 2019

WIP: do not merge

Presented for discussion, relating to SciTools#3422.
This is a prototype implementation of how we could store coordinate bounds as a separate _DimensionalMetadata component object, so we can use the same code to manage points + bounds in indexing or arithmetic operations (+ possibly others).
The parent _DimensionalMetadata class no longer contains any bounds-related code.

Compare with #7.
This is ultimately a tidier approach, but not entirely straightforward : there are still test failures here to resolve.

@@ -173,7 +159,8 @@ def copy(self, values=None):

return new_metadata

def _sanitise_array(self, src, ndmin):
@staticmethod
def _sanitise_array(src, ndmin):
Copy link
Owner

Choose a reason for hiding this comment

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

We could still make _sanitise_array a static method in #7

Copy link
Author

Choose a reason for hiding this comment

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

Yes, if it seems sensible.

@pp-mo pp-mo closed this Oct 23, 2019
@pp-mo pp-mo deleted the ancil_var_strict branch March 18, 2022 15:28
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.

2 participants