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

Clean up type hinting #99

Open
billbrod opened this issue Feb 9, 2024 · 1 comment
Open

Clean up type hinting #99

billbrod opened this issue Feb 9, 2024 · 1 comment

Comments

@billbrod
Copy link
Member

billbrod commented Feb 9, 2024

In workshop, the type hinting for our methods was really really long, because NDArray was being fully expanded. There's a way to avoid this (I had this problem in plenoptic or pyrtools).

@billbrod
Copy link
Member Author

billbrod commented Feb 9, 2024

Okay, turns out I had this problem in nemos. The solution is to add from __future__ import annotations to the top of the file. I've noticed this with the GLM, but it's possible it's showing up in other places as well.

However, then the type for X in the different GLM methods just reads: X: 'Union[DESIGN_INPUT_TYPE, ArrayLike]', and DESIGN_INPUT_TYPE is fairly opaque (ArrayLike is fine). what should we do?

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