pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
## Description Apparently both out implementation and numba's can be pretty dumb for reductions. This PR tries to default to the Numba case when possible. I am not sure this...
## Description ## Related Issue - [ ] Closes # - [ ] Related to # ## Checklist - [ ] Checked that [the pre-commit linting/style checks pass](https://docs.pymc.io/en/latest/contributing/python_style.html) - [...
## Description Replaced all instances of ```assert_allclose``` with corresponding ```np.testing.assert_allclose```. ## Related Issue - [x] Closes #551 - [ ] Related to ## Checklist - [x] Checked that [the pre-commit...
### Description Some example rewrite code ```python @node_rewriter([Subtensor]) def local_subtensor_of_join(fgraph, node): """Lift a Subtensor through a Join. join(axis=1, x, y)[0] -> join(axis=0, x[0], y[0]) join(axis=0, x, y, z, w)[2] ->...
Completely redo the implementation of the Rop/Lop/grad functions and replace them by `pull_back`, `push_forward`. `grad` can just call `pull_back` then. They are currently not really working, but only a sketch...
### Description Right now we need to add `specify_shape` if we want to squeeze a dimension that the user (but not PyTensor) known to be length 1. This complicates the...
### Describe the issue: Using `pymc.draw()` with truncated distributions throws warnings about shape inference failures in `pytensor` when no shape information is provided in `pymc`. The draws are still returned....
### Describe the issue: ``` ============================================================================================================ ERRORS ============================================================================================================ _____________________________________________________________________________________ ERROR collecting pytensor/misc/elemwise_time_test.py _____________________________________________________________________________________ /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1030: in _gcd_import ??? :1007: in _find_and_load ??? :972: in...
### Description `pytensor.function()` returns a class with a complicated [`__call__` method](https://github.com/pymc-devs/pytensor/blob/4730d0cb7db40bd25d937bcbcf187b8bdec4e6de/pytensor/compile/function/types.py#L791-L1071) that puts inputs and allocates outputs in list like objects that are very much tuned to the C backend....
### Description The Composite checks if scalar Ops have a C implementation before attempting to fuse them. This does not make sense for non-C backends. For Numba we might want...