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

Sparse and Stats Support #69

Open
tswallen opened this issue Sep 16, 2021 · 11 comments
Open

Sparse and Stats Support #69

tswallen opened this issue Sep 16, 2021 · 11 comments
Labels
question Notes an issue as a question

Comments

@tswallen
Copy link

Hey there

I am needing to include the following functions:

  • sparse.eye
  • sparse.linalg.spsolve
  • sparse.lil_matrix
  • stats.zscore

And I am a little confused about how to do this with your library! There is something to do with Cython? Can I please get some pointers on how I can get started migrating these functions?

Cheers

@esc esc added the question Notes an issue as a question label Sep 16, 2021
@esc
Copy link
Member

esc commented Sep 16, 2021

Hey there

I am needing to include the following functions:

  • sparse.eye
  • sparse.linalg.spsolve
  • sparse.lil_matrix
  • stats.zscore

And I am a little confused about how to do this with your library! There is something to do with Cython? Can I please get some pointers on how I can get started migrating these functions?

Thank you for asking about this! However, I am not sure how to help you. numba-scipy is a very nascent project and we do not yet have documentation on how to contribute specific features. Does that help? Otherwise, it would probably make sense for you to pick a specific task, try to implement that and then come back with a pull-request for us to comment on?

Beyond that the developer documentation is here: https://numba-scipy.readthedocs.io/en/latest/developer/contributing.html -- but beware this is also quite nascent, so it may be somewhat buggy. If you do find any issue with it or things that are unclear, we would very much appreciate you opening an issue or even a PR to address that.

As for the features you are trying to implement, I know very little about scipy.sparse and stats.zscore(but perhaps someone else could chime in?) -- so I can't give you any advice there, but I would like to mention an alternative sparse matrix package: https://sparse.pydata.org/en/stable/ (actually uses Numba under the hood already), maybe that can help you?

@tswallen
Copy link
Author

Sure. I've just been doing some reading and have two plans of attack. One is to do what you've done already and import functions from Cython. I've never used this before but I imaging I'd first need to convert what I wanted to Cython to get the pyx file and then import it from there, is that reccomended?

@esc
Copy link
Member

esc commented Sep 17, 2021

Sure. I've just been doing some reading and have two plans of attack. One is to do what you've done already and import functions from Cython. I've never used this before but I imaging I'd first need to convert what I wanted to Cython to get the pyx file and then import it from there, is that reccomended?

I would recommend to take a look at https://github.com/numba/numba-scipy/blob/master/numba_scipy/special/signatures.py -- this is how the cython parts of SciPy are dynamically loaded and should give you an insight, I believe.

@esc
Copy link
Member

esc commented Sep 17, 2021

Sure. I've just been doing some reading and have two plans of attack. One is to do what you've done already and import functions from Cython. I've never used this before but I imaging I'd first need to convert what I wanted to Cython to get the pyx file and then import it from there, is that reccomended?

I would recommend to take a look at https://github.com/numba/numba-scipy/blob/master/numba_scipy/special/signatures.py -- this is how the cython parts of SciPy are dynamically loaded and should give you an insight, I believe.

Especially I would recommend taking a closer look at:

import scipy.special.cython_special as cysc

To see what that does.

@tswallen
Copy link
Author

Yeah but there is no cysc for the functions I'm after unless:

  1. I'm looking in the wrong area
  2. I need to add Cython myself

@tswallen
Copy link
Author

Would it be possible to request you guys import one non-cython function (doesn't matter if it's just a simple one) to show me how you'd like it done?

@esc
Copy link
Member

esc commented Sep 23, 2021

Would it be possible to request you guys import one non-cython function (doesn't matter if it's just a simple one) to show me how you'd like it done?

Thank you for asking about this. I believe this is uncharted territory, so I think someone will have to work out how to do this in a sensible way first. Perhaps someone else from the community has a vague idea and could potentially provide a sketch or a starter patch? Thank you!!

@tswallen
Copy link
Author

@esc how can we reach out to this community?

@esc
Copy link
Member

esc commented Sep 24, 2021

@esc how can we reach out to this community?

We are, by communicating on this issue tracker! Numba-scipy is very nascent and the community is tiny. So we'll have to wait and 🤞🤞🤞

@lyysl
Copy link

lyysl commented May 15, 2023

I want to ask if any updates? I have a scipy.sparse.csr_matrix and I want solve the matrix equation using sparse.linalg.spsolve. Is it available now? Thank you.

@esc
Copy link
Member

esc commented May 16, 2023

I want to ask if any updates? I have a scipy.sparse.csr_matrix and I want solve the matrix equation using sparse.linalg.spsolve. Is it available now? Thank you.

I am not aware of any updates at this time.

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

No branches or pull requests

3 participants