-
Notifications
You must be signed in to change notification settings - Fork 143
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
base: main
Are you sure you want to change the base?
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.57%
=======================================
Files 242 242
Lines 53819 53827 +8
Branches 9485 9485
=======================================
+ Hits 43899 43907 +8
Misses 7431 7431
Partials 2489 2489
🚀 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. |
Description
Rename
tensor.sparse.mul
->tensor.sparse.multiply
andtensor.sparse.sub
->tensor.sparse.subtract
Related Issue
multiply
to match numpy #1370, Rename tosubtract
to make numpy API compat #1371Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1663.org.readthedocs.build/en/1663/