We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
expand_dims
The model behind #1132 cannot run in non-obj numba due to an implicit expand_dims in the vector indexing, that looks like:
import pytensor import pytensor.tensor as pt import numpy as np a = pt.tensor(shape=(None, None)) b = a[pt.arange(10)[:, None], pt.arange(10)[:, None]] c = a[pt.arange(10), pt.arange(10)][:, None] # Issues UserWarning: Numba will use object mode to run AdvancedSubtensor's perform method fn_b = pytensor.function([a], b, mode="NUMBA") # Runs in non-obj mode fn_c = pytensor.function([a], c, mode="NUMBA") test_a = pt.random.normal(size=(10, 10)).eval() np.testing.assert_allclose(fn_b(test_a), fn_c(test_a))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The model behind #1132 cannot run in non-obj numba due to an implicit expand_dims in the vector indexing, that looks like:
The text was updated successfully, but these errors were encountered: