Skip to content
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

Python wrapper #200

Open
rth opened this issue Jun 19, 2020 · 6 comments
Open

Python wrapper #200

rth opened this issue Jun 19, 2020 · 6 comments

Comments

@rth
Copy link
Contributor

rth commented Jun 19, 2020

I am considering to start experimenting with a Python wrapper for sprs, probably in some separate repo. The situation with sparse array libraries is not so great in the Python space right now. scipy.sparse is fairly legacy, follows the numpy.matrix protocols instead of numpy.ndarray and generally is difficult to improve because of the amount of code. There is pydata/sparse but it's still fairly new and there are some performance concerns.

Just wanted to open the issue to see if there is any interest, or if someone considered it before. It would probably make it easier to compare performance wise with sparse python libraries as well.

@vbarrielle
Copy link
Collaborator

That would be nice, and something I'd like to see happen eventually, but as the recent performance issues showed, there needs to be some performance improvements in sprs as well.

@chetmurthy
Copy link
Contributor

I've started down this road myself, for a project I'm working on. If anybody else is sufficiently interested, I can put the code into a repo and publish it. I'm happy to write lots of code, but would appreciate guidance and suggestions as to what the API should look like (and of course, coding suggestions -- I'm pretty new to Rust (<3wk)).

@chetmurthy
Copy link
Contributor

And of course, if you want to move such support into sprs, that'd be fine too. I only suggest putting it in a repo as a way to facilitate sharing and discussion.

@rth
Copy link
Contributor Author

rth commented Jun 21, 2022

If anybody else is sufficiently interested, I can put the code into a repo and publish it.

Yes, I think a repo under your account would be a great start. Then later it could be discussed where best to put it.

but would appreciate guidance and suggestions as to what the API should look like

From a Python user perspective, IMO having something that has the scipy.sparse ndarray API even if it doesn't implement all the methods would make it much easier to use in existing code bases. Unless there are reasons specific to sprs to deviate from it. In any case, good support for numpy arrays would be necessary via https://github.com/PyO3/rust-numpy

@chetmurthy
Copy link
Contributor

chetmurthy commented Jul 23, 2022

oops, I forgot you'd opened an issue on this.

python interface for sprs: #315

@chetmurthy
Copy link
Contributor

Hi, have you had a chance to think about how we might make progress on a python wrapper? I threw the thing I wrote onto github, but have somewhat stopped working on it, waiting for feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants