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

Investigate implementing rand/randn in pure Cython #1264

Open
mstimberg opened this issue Jan 13, 2021 · 0 comments
Open

Investigate implementing rand/randn in pure Cython #1264

mstimberg opened this issue Jan 13, 2021 · 0 comments

Comments

@mstimberg
Copy link
Member

The current Cython implementation for Cython (i.e. rand() and randn()) jumps through some hoops to call numpy's random functions via Python, buffering it in a numpy array. Since numpy 1.8, numpy.random has a dedicated Cython/C API, so we might be able to replace this with an easier and more efficient solution.

https://numpy.org/doc/stable/reference/random/c-api.html

This is mostly a note for my future self, I have not yet looked into this in detail.

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

No branches or pull requests

1 participant