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

type-hinting numpy mixed array records #16

Open
aryarm opened this issue Jan 10, 2022 · 0 comments
Open

type-hinting numpy mixed array records #16

aryarm opened this issue Jan 10, 2022 · 0 comments
Assignees

Comments

@aryarm
Copy link
Member

aryarm commented Jan 10, 2022

There are at least two times where I've wanted to be able to place restrictions on the type of numpy mixed array records that my functions can accept:

  1. When storing values in the AssocResults class
  2. When storing values in the Variant class

Specifically, I want to require that the numpy mixed array record that is received has specific attributes. What's the best way for me to do that?

One idea is to write a class that extends numpy's and then calls a checker in the init.

@aryarm aryarm self-assigned this Jan 17, 2022
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

No branches or pull requests

1 participant