-
Notifications
You must be signed in to change notification settings - Fork 146
Rename sparse functions to match numpy array API #1663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cee1e72
to
b331f9a
Compare
hmm I'm sure that issue was meant for tensor operations not sparse. Those don't exist on numpy so we can't "match their API". How does scipy call them? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1663 +/- ##
==========================================
+ Coverage 81.56% 81.61% +0.04%
==========================================
Files 242 242
Lines 53819 53533 -286
Branches 9485 9433 -52
==========================================
- Hits 43899 43691 -208
+ Misses 7431 7366 -65
+ Partials 2489 2476 -13
🚀 New features to boost your workflow:
|
We want to match numpy/scipy API, in case it doesn't have an equivalent (like subtract it seems), we can use the array API as the next best thing. That's where numpy/scipy want to converge anyway |
So both changes are fine |
Do you want me to do the |
As you prefer, it's your work |
I started looking into this, but it seems like a pretty big job. I made the trivial replacements, then \started hitting all kinds of random bugs with rewrites and prettyprint and was quickly demotivated. |
In that case that's perhaps best left as another issue&PR? It sounds like the kind of PRs that keep me entertained |
Ok done, lmk if you guys want anything else changed in this PR or not. |
I sold out my principals for the good of the project, someone please approve my pr :( |
Description
Rename
tensor.sparse.mul
->tensor.sparse.multiply
andtensor.sparse.sub
->tensor.sparse.subtract
Related Issue
pytensor.tensor.math.mul
topytensor.tensor.math.multiply
to match array API standard #1370, Renamepytensor.tensor.math.sub
topytensor.tensor.math.subtract
to match array API #1371Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1663.org.readthedocs.build/en/1663/