-
Notifications
You must be signed in to change notification settings - Fork 49
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
refactor[next]: NamedRange/NamedIndex tuple to NamedTuple #1490
Conversation
src/gt4py/next/common.py
Outdated
@@ -301,15 +309,14 @@ def is_int_index(p: Any) -> TypeGuard[IntIndex]: | |||
|
|||
def is_named_range(v: AnyIndexSpec) -> TypeGuard[NamedRange]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the end this function can be removed and replaced by just an isinstance check
Co-authored-by: Hannes Vogt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor questions and comments.
src/gt4py/next/common.py
Outdated
@@ -484,10 +493,10 @@ def __and__(self, other: Domain) -> Domain: | |||
_broadcast_ranges(broadcast_dims, other.dims, other.ranges), | |||
) | |||
) | |||
return Domain(dims=broadcast_dims, ranges=intersected_ranges) | |||
return Domain(dims=broadcast_dims, ranges=intersected_ranges) # TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete TODO
Co-authored-by: Enrique González Paredes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good.
Change NamedRange and NamedIndex from being a plain tuple to a NamedTuple for cleaner element access.