pytensor
pytensor copied to clipboard
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
### Description If the number of repetitions in `pt.repeat` is homogeneous, we could replace it by `repeat(x, unique_value)`. Under the hood this ends up as an alloc, skipping the non-C...
### Description Users should be able to set ityes and otypes for as_jax_op/wrap_jax directly if they want to avoid automatic inference, just as in as_op.
### Description ScalarOps are parametrized by an `output_types_preference` that determines the output types from the input types in `make_node` (unless an Op overrides `make_node`). This is used indirectly via `output_types`....
## Description Adds pt.pack and pt.unpack helpers, roughly conforming to the `einops` functions of the same name. These helps are for situations where we have a ragged list of inputs...
### Description I tried it in this commit: https://github.com/pymc-devs/pytensor/pull/1592/commits/07e50e20e4ae952a7aba7b68cf1a97373fa3eba5, some tests failed which need to be checked. Nothing crazy should be needed, maybe I did a small error in the...
### Description Scan and Composite/ScalarLoop are our only ops with inner graph that support equality /merging. The way equality / hashing is done it's to use the generated c_code or...
### Description We take small performance hits by using `scipy.linalg` functions rather than directly calling lapack functions in our `perform` methods. These wrappers include a lot of data validation checks...
### Description OPs are supposed to be immutable/ hashable. The hash of the Scan Op is defined based on the graph with which it is created originally. However the equality...
### Description I'm investing implementing ALS in pytensor which is usually implemented with sparsity constructs (see [implicit](https://benfred.github.io/implicit/api/models/cpu/als.html) for reference). I quickly looked around and saw this [older thread](https://discourse.pymc.io/t/sparse-linear-system-solving-inside-pymc/14963/2) where someone...
### Describe the issue: Due to changes in https://github.com/pymc-devs/pytensor/pull/1582, as part of https://github.com/pymc-devs/pytensor/issues/1550, the following codeblock(s) in https://pytensor.readthedocs.io/en/latest/gallery/optimize/root.html fail: ### Reproducable code example: ```python import pytensor import pytensor.tensor as pt...