Skip to content

_reshape_and_preserve_tags: support untaggable arrays#381

Merged
inducer merged 3 commits into
mainfrom
reshape_and_preserve_tags-untagged
Jun 22, 2023
Merged

_reshape_and_preserve_tags: support untaggable arrays#381
inducer merged 3 commits into
mainfrom
reshape_and_preserve_tags-untagged

Conversation

@matthiasdiener

@matthiasdiener matthiasdiener commented Jun 21, 2023

Copy link
Copy Markdown
Collaborator

(e.g. np.ndarray)

cc inducer/arraycontext#235

@matthiasdiener matthiasdiener self-assigned this Jun 21, 2023
@matthiasdiener matthiasdiener requested a review from inducer June 21, 2023 19:24
@inducer

inducer commented Jun 21, 2023

Copy link
Copy Markdown
Owner

I'm not sure why that'd be necessary. For arrays that don't do tagging, wouldn't actx.tag be a no-op?

@matthiasdiener

matthiasdiener commented Jun 22, 2023

Copy link
Copy Markdown
Collaborator Author

I'm not sure why that'd be necessary. For arrays that don't do tagging, wouldn't actx.tag be a no-op?

actx.tag() is a no-op in inducer/arraycontext#235, but ary.tags won't work (since ary is an ndarray in that case).

@inducer

inducer commented Jun 22, 2023

Copy link
Copy Markdown
Owner

actx.tag is a no-op in inducer/arraycontext#235, but ary.tags won't work (since ary is an ndarray in that case).

That makes sense. But in that case, only the access ary.tags should be in the try block.

@matthiasdiener

Copy link
Copy Markdown
Collaborator Author

That makes sense. But in that case, only the access ary.tags should be in the try block.

What do you think of 50f3134?

@inducer inducer merged commit 94f442c into main Jun 22, 2023
@inducer inducer deleted the reshape_and_preserve_tags-untagged branch June 22, 2023 16:10
@inducer

inducer commented Jun 22, 2023

Copy link
Copy Markdown
Owner

LGTM, thanks!

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