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

Possible reference before assignment in bulk statistics? #364

Closed
freemansw1 opened this issue Nov 10, 2023 · 3 comments · Fixed by #368
Closed

Possible reference before assignment in bulk statistics? #364

freemansw1 opened this issue Nov 10, 2023 · 3 comments · Fixed by #368
Labels
bug Code that is failing or producing the wrong result
Milestone

Comments

@freemansw1
Copy link
Member

freemansw1 commented Nov 10, 2023

In working on the new windows bug discovered in #353, I'm digging into bulk_statistics.py/get_statistics_from_mask. In looking at this line:

field_t = field.sel(time=tt).data

it appears that there should be another loop for field? I'm not that familiar with this code though, so tagging @JuliaKukulies .

@w-k-jones
Copy link
Member

Good catch! It'll be using the last field array from the loop at L185. Should be a quick fix to update to a generator, I'll do that now

@JuliaKukulies
Copy link
Member

Good catch @freemansw1 and thank you so much for taking care of this, @w-k-jones !

@freemansw1 freemansw1 added the bug Code that is failing or producing the wrong result label Nov 13, 2023
@freemansw1 freemansw1 added this to the Version 1.5.2 milestone Nov 13, 2023
@JuliaKukulies JuliaKukulies mentioned this issue Nov 21, 2023
8 tasks
@w-k-jones w-k-jones linked a pull request Nov 23, 2023 that will close this issue
11 tasks
@freemansw1
Copy link
Member Author

Closing with #368 being merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code that is failing or producing the wrong result
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants