Skip to content

Fix non-contiguous reshapes in numba backend #255

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

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

aseyboldt
Copy link
Member

@aseyboldt aseyboldt commented Mar 20, 2023

np.reshape(x, some_shape) fails in numba if x is not contiguous. This can lead to compilation failures. We can work around this by converting to a contiguous array if it is not already the case. This is happening in code in dim_shuffle where the output shape is (), so a valid input array will always be contiguous, but numba doesn't seem to realize this.

Fixes pymc-devs/nutpie#40.

Checklist

@aseyboldt aseyboldt marked this pull request as ready for review March 20, 2023 19:47
@aseyboldt aseyboldt merged commit bfd7257 into pymc-devs:main Mar 20, 2023
@ricardoV94 ricardoV94 added bug Something isn't working numba labels Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working numba
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nutpie fails to compile
3 participants