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 We're missing this simple rewrite: ``` import pytensor.tensor as pt from pytensor.graph import rewrite_graph x = pt.scalar("x") out = pt.log(pt.gamma(x)) new_out = rewrite_graph(out, include=("canonicalize", "stabilize", "specialize")) new_out.dprint() ```...

graph rewriting
stabilization

### Description ```python import numpy as np x1, x2, y = np.random.normal(size=(3, 1000, 1)) assert np.isclose(x1.T @ y + x2.T @ y, (x1 + x2).T @ y) %timeit x1.T @...

graph rewriting
performance
linalg

The fact that we wrap a graph in OpFromGraph, doesn't mean we also want to wrap it's gradient. It can also lead to troubles as in https://github.com/pymc-devs/pymc/issues/7657 I suggest adding...

enhancement
gradients
OpFromGraph

## Description We add a rewrite for matrix inversion when the matrix is triangular. We check three conditions: - If there is a tag which is upper/lower triangular - If...

## Description This test is flakey and responsible for a lot of random headaches. It does not appear to be required to fail? The test links to issue #770, but...

maintenance
no releasenotes
tests

## Description The MLX dispatch for `IncSubtensor` was assuming that the indexes would always be integers, but they can actually be either integers or slices. This PR adds logic to...

bug
mlx

Closes #1693

enhancement
backend compatibility
mlx

Cherry picking changes from #1604 It seems that simply improving the caching of individual Ops gives us a lot of speedup when still jitting the whole graph. THIS is still...

enhancement
numba
performance
compilation

This could cause spurious disconnected errors, because the tensorified variable was not in the graph of the cost ---- 📚 Documentation preview 📚: https://pytensor--1685.org.readthedocs.build/en/1685/

bug
gradients

added trust_inputs to pytensor functions, added multiple pytensor backends, added block_until_ready to jax calls ## Description This PR adds a benchmarking notebook that benchmarks several algorithms in different backends and...