Skip to content

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

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

bashtage
Copy link
Contributor

Test examples on Linux and Windows
Correct bug in Cython example
Improve building instructions for numba examples

Test examples on Linux and Windows
Correct bug in Cython example
Improve building instructions for numba examples
@bashtage
Copy link
Contributor Author

@mattip I don't quite see how the function in distributions.c can be used in Cython code. Am I missing something?

@mattip
Copy link
Member

mattip commented Nov 21, 2019

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


Copy link
Member

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

Copy link
Contributor Author

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.

@bashtage
Copy link
Contributor Author

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.

I'll move it over there then.

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

Successfully merging this pull request may close these issues.

2 participants