Skip to content

Conversation

@jessegrabowski
Copy link
Member

@jessegrabowski jessegrabowski commented Oct 20, 2025

Description

Fixes a bug uncovered by pymc-devs/pymc-extras#597 . When we switched from jax.numpy.linalg.qr to jax.scipy.linalg.qr, the return type changed from a matrix to a 1-tuple when mode='r'.

This PR fixes this by unpacking the return of jax.scipy.linalg.qr when only one value is returned.

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pytensor--1682.org.readthedocs.build/en/1682/

@jessegrabowski jessegrabowski added bug Something isn't working jax SciPy compatibility linalg Linear algebra labels Oct 20, 2025
@ricardoV94
Copy link
Member

I'm gonna trust you ran pre-commit since the CI one is not running :)

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.62%. Comparing base (792bd04) to head (a3a7c4c).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1682      +/-   ##
==========================================
- Coverage   81.64%   81.62%   -0.02%     
==========================================
  Files         242      242              
  Lines       53573    53545      -28     
  Branches     9453     9442      -11     
==========================================
- Hits        43737    43708      -29     
- Misses       7358     7361       +3     
+ Partials     2478     2476       -2     
Files with missing lines Coverage Δ
pytensor/link/jax/dispatch/slinalg.py 95.14% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ricardoV94 ricardoV94 merged commit 5547eb0 into main Oct 20, 2025
58 of 59 checks passed
@ricardoV94 ricardoV94 deleted the jax-qr-return branch October 20, 2025 15:04
@ricardoV94
Copy link
Member

@jessegrabowski you're a naughty boy, opening PRs on the pymc-devs branch instead of your own fork

@jessegrabowski
Copy link
Member Author

Ah my bad, thanks for pointing that out. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working jax linalg Linear algebra SciPy compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants