Skip to content

Conversation

@C2oWisComing
Copy link
Contributor

Description Of Changes

Fix galvez_davison_index error when missing data at 950 hPa. In raise ValueError at:
f'\n{np.max(pressure, axis=0)[indices_without_950]}'
It show error message: "invalid index to scalar variable". This cause from [indices_without_950] behind the np.max().

Checklist

  • Closes #xxxx
  • Tests added (Re-test already)
  • Fully documented (Didn't edit any documents.)

@C2oWisComing C2oWisComing requested a review from a team as a code owner June 5, 2024 06:37
@C2oWisComing C2oWisComing requested review from dopplershift and removed request for a team June 5, 2024 06:37
@dopplershift dopplershift added this to the 1.6.3 milestone Jun 17, 2024
@dopplershift
Copy link
Member

Is there an easy test you could add based on how you were using the function when it errored?

0d arrays is deprecated on line:4594, when test
with simple value.
@C2oWisComing
Copy link
Contributor Author

I apologize for making you wait. I add new test function with simple value and found new problem "DeprecationWarning: Calling nonzero on 0d arrays is deprecated". That cause from indices_without_950 too.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

@dopplershift dopplershift merged commit f7215f3 into Unidata:main Jul 9, 2024
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

Successfully merging this pull request may close these issues.

2 participants