Skip to content

Conversation

@a-alveyblanc
Copy link
Contributor

unreshape_array_for_tensor_product_space currently fails for 1D. It checks space.bases, but in 1D this is PN, which doesn't have a bases attribute. This leads to a bunch of unnecessary checks on spatial dimension before attempting to reshape in an upstream package to guarantee we don't fail.

reshape_array_for_tensor_product_space works in the 1D case, but does some unnecessary work since the input array and returned array will be the same.

If the spatial dimension of the space is 1, we should just return the array in both cases since there's nothing to do. This PR updates corresponding functions to do just that. Also updates one of the tests to test for unreshape_array_for_tensor_product_space to test the 1D case.

@inducer inducer enabled auto-merge (squash) December 15, 2024 05:29
@inducer
Copy link
Owner

inducer commented Dec 15, 2024

LGTM, thanks!

@inducer inducer merged commit 38a342c into inducer:main Dec 15, 2024
9 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.

2 participants