-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
DOC: Clean up examples of low-level random access #14951
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
Conversation
Test examples on Linux and Windows Correct bug in Cython example Improve building instructions for numba examples
@mattip I don't quite see how the function in distributions.c can be used in Cython code. Am I missing something? |
You are correct. We started that discussion in gh-14778, but did not resolve how to do this cleanly. I am also concerned that exposing all of the functions in lines 54-138 increases the C-API we then commit to maintain. |
|
||
|
||
def normals(n, bit_generator): | ||
out = np.empty(n) | ||
for i in range(n): | ||
out[i] = random_gauss_zig(bit_generator) | ||
out[i] = random_standard_normal(bit_generator) | ||
return out | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could run this as part of the tests, like we run the extending.py
example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on numba or at least CFFI, so probably not worth it. But definitely a risk that examples get stale, so ideally these things get run somewhere.
I'll move it over there then. |
Test examples on Linux and Windows
Correct bug in Cython example
Improve building instructions for numba examples