numba-scipy
numba-scipy copied to clipboard
Sparse and Stats Support
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
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?
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?
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.
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.
Yeah but there is no cysc for the functions I'm after unless:
- I'm looking in the wrong area
- I need to add Cython myself
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?
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!!
@esc how can we reach out to this community?
@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 🤞🤞🤞
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 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.