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

Hotfix for GMHazard API tests #268

Merged
merged 2 commits into from
Apr 4, 2022
Merged

Hotfix for GMHazard API tests #268

merged 2 commits into from
Apr 4, 2022

Conversation

SnowNooDLe
Copy link
Contributor

HOTFIX qcore for GMHazard API tests

d.shape is something like (1, 122) so we need to check the 0 index instad.

Examples

"/tmp/core_api_test_20220404_0500028ic4suox/gmhazard/calculation/gmhazard_calc/gmhazard_calc/nz_code/nzta_2018/nzta.py", line 180, in __location_lookup
   idx, dist = geo.closest_location(
 File "/tmp/core_api_test_20220404_0500028ic4suox/qcore/qcore/geo.py", line 59, in closest_location
   return i, d[i]
IndexError: index 93 is out of bounds for axis 0 with size 1
"/tmp/core_api_test_20220404_0500028ic4suox/gmhazard/calculation/gmhazard_calc/gmhazard_calc/nz_code/nzta_2018/nzta.py", line 180, in __location_lookup
   idx, dist = geo.closest_location(
 File "/tmp/core_api_test_20220404_0500028ic4suox/qcore/qcore/geo.py", line 59, in closest_location
   return i, d[i]
IndexError: index 93 is out of bounds for axis 0 with size 1

Copy link
Contributor

@joelridden joelridden left a comment

Choose a reason for hiding this comment

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

Made a mistake with my testing script and had the parameters the wrong way accidentally.
d.shape[0] is what it should have been

@SnowNooDLe SnowNooDLe merged commit c624420 into master Apr 4, 2022
@SnowNooDLe SnowNooDLe deleted the hotfix branch April 4, 2022 00:14
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.

4 participants