pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.

Results 395 pytensor issues
Sort by recently updated
recently updated
newest added

### Description Define $\text{vec}(X)$ as the ravel operator that works column-wise (that's the math convention, so in code it's `x.reshape(-1, order="F")`. Given $(A \otimes B)x = y$. If $y =...

graph rewriting
performance
linalg

### Describe the issue: Hi all, getting this error when trying to compile any functions which involve elementwise multiplication (edit: and any binary op it seems) of two arrays when...

bug

### Description This came up in the context of #1550 . There are many cases where we want to be able to ravel a sequence of inputs into a single...

enhancement
feature request

### Describe the issue: When attempting to backprop through the `logp` of a graph which contains a `MinimizeOp`, an error is thrown in which it attempts to concatenate tensors of...

bug

### Description Shoud be simple, just use `pt.arange` to allow symbolic inputs: https://github.com/numpy/numpy/blob/e7a123b2d3eca9897843791dd698c1803d9a39c2/numpy/lib/_index_tricks_impl.py#L1010-L1011 And for `diag_indices_from`: https://github.com/numpy/numpy/blob/e7a123b2d3eca9897843791dd698c1803d9a39c2/numpy/lib/_index_tricks_impl.py#L1062-L1069 I would perhaps use `pt.max(arr.shape)` instead, and let indexing fail at runtime if...

beginner friendly
NumPy compatibility

### Description This is in MetaType, but AFAICT only ops ever have __props__ https://github.com/pymc-devs/pytensor/blob/17748b7d3419e78e7dfad3dc768908ac240aa6df/pytensor/graph/utils.py#L193-L234 Generating them dynamically like this means linters / mypy don't believe in `op._props()` or `op._props_dict()`. I...

graph objects
Op implementation
refactor

Some old notebook using egglog: * https://colab.research.google.com/drive/1douR7yw6LDWn65c-fPuVroXrOz5CxEzU Some old notebook reimplementing egglog from scratch: * https://colab.research.google.com/drive/1JHSWiC9bsJYHAKe3Ee3q88YoNvEI7RNC * https://colab.research.google.com/drive/11M47Q_aPr_UT8Zv_kawLLCU1bRX1wi2F

do not merge
graph rewriting

### Description In the example below we end up computing 4 dots, whereas only 3 are needed ```python import pytensor import pytensor.tensor as pt from pytensor.compile.mode import get_default_mode A =...

graph rewriting
performance
linalg

## Description I explored using variables directly with is definitely doable. Some helpful functions where: ```python def _get_edges(variable): if variable.owner is None: return yield from ((variable, input_var) for input_var in...

### Description As brought up in #1494 it's odd to have a hard-coded 500 number at which we stop trying to inplace scalar graphs. We could consider: 1. Remove this...

graph rewriting
memory_optimization