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

Fix ArrayLike TypeVar #10

Closed
mlshapiro opened this issue Feb 15, 2023 · 0 comments
Closed

Fix ArrayLike TypeVar #10

mlshapiro opened this issue Feb 15, 2023 · 0 comments
Labels
bug Something isn't working chore Setup or maintenance debt Technical debt

Comments

@mlshapiro
Copy link
Contributor

Description

The ArrayLike TypeVar is not set up correctly and may be hiding underlying type inconsistencies. Our goal here was to create a single type that could handle xr.DataArray and np.ndarray consistently.

It currently works decently well, but we have to use inline ignores in certain circumstances (see # type: ignore[assignment]).

I think the preferred solution is to use np.ndarray everywhere specifying the types we expect in the array.

Details

  • Version: 0.35.0
  • Module: utils.types
  • Reporter: @mlshapiro

Additional Notes

This may require more handling in the basic grid models, like issr, sac, pcr.

@mlshapiro mlshapiro added the bug Something isn't working label Feb 15, 2023
@mlshapiro mlshapiro transferred this issue from another repository Mar 22, 2023
@mlshapiro mlshapiro added debt Technical debt chore Setup or maintenance labels Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Setup or maintenance debt Technical debt
Projects
None yet
Development

No branches or pull requests

1 participant