pymc-devs / pytensor

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

Home Page:https://pytensor.readthedocs.io

Repository from Github https://github.compymc-devs/pytensorRepository from Github https://github.compymc-devs/pytensor

Add `transposed` argument to `pt.linalg.solve`

jessegrabowski opened this issue · comments

Description

This is allowed by scipy.linalg.solve, so we might as well support it. It's already an allowed argument for pt.linalg.solve_trianguar, so it's weird that it's not allowed generally. It will also save a transpose Op in the gradients of solve, because we can do b_bar = solve(A, x_bar, transposed=True) instead of b_bar=solve(A.T, x_bar). I understand transpose is just a stride thing, but I'm a completionist.