Skip to content

Add assert_array_shape calls to method code #267

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

Open
tomwhite opened this issue Sep 16, 2020 · 3 comments
Open

Add assert_array_shape calls to method code #267

tomwhite opened this issue Sep 16, 2020 · 3 comments
Labels
core operations Issues related to domain-specific functionality such as LD pruning, PCA, association testing, etc. good first issue Good for newcomers

Comments

@tomwhite
Copy link
Collaborator

The assert_array_shape call is used a lot in REGENIE, and serves both as a runtime check and as documentation for the reader. We should sprinkle it liberally through other functions.

@tomwhite tomwhite added good first issue Good for newcomers core operations Issues related to domain-specific functionality such as LD pruning, PCA, association testing, etc. labels Sep 16, 2020
@ravwojdyla ravwojdyla mentioned this issue Oct 10, 2020
2 tasks
@ravwojdyla
Copy link
Collaborator

Quoting from https://github.com/pystatgen/sgkit/pull/314#discussion_r502548783:

I meant to ask this question many times actually, so we use these asserts pretty generously, which I like, but I wonder if we should ever worry about those assert statements getting optimised out?

@tomwhite
Copy link
Collaborator Author

Good point. I think we should perhaps document it, but I don't think we should come up with a new assertion mechanism.

@ravwojdyla
Copy link
Collaborator

@tomwhite yea, I suppose it could be part of this issue to add documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core operations Issues related to domain-specific functionality such as LD pruning, PCA, association testing, etc. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants