inducer / meshmode

High-order unstructured mesh representation and discrete function spaces
https://documen.tician.de/meshmode/
26 stars 23 forks source link

_reshape_and_preserve_tags: support untaggable arrays #381

Closed matthiasdiener closed 1 year ago

matthiasdiener commented 1 year ago

(e.g. np.ndarray)

cc https://github.com/inducer/arraycontext/pull/235

inducer commented 1 year ago

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 commented 1 year ago

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 https://github.com/inducer/arraycontext/pull/235, but ary.tags won't work (since ary is an ndarray in that case).

inducer commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

LGTM, thanks!