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

Standardise NDArray typing #334

Closed
davidorme opened this issue Oct 18, 2024 · 0 comments · Fixed by #335
Closed

Standardise NDArray typing #334

davidorme opened this issue Oct 18, 2024 · 0 comments · Fixed by #335

Comments

@davidorme
Copy link
Collaborator

At the moment, we have rather variable typing of NDArray variables.

We’ve have some variables typed as NDArray[[np.int]] and NDArray[np.str_] but then the demography module has been using NDArray[np.float32] and much of the rest of the codebase has bare NDArray.

The np.float32 in the demography wasn't very well thought through. The rationale is simply to reduce memory requirements and (maybe?) run faster, but because it is so piecemeal it likely isn't effective at either due to type promotion etc. We have #304 to think about addressing this more systematically, but for now we should just type NDArray and do so consistently.

@davidorme davidorme linked a pull request Oct 18, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant