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

MAINT: numpy 1.24 compliance #46

Open
jklenzing opened this issue Dec 21, 2022 · 3 comments · May be fixed by #47
Open

MAINT: numpy 1.24 compliance #46

jklenzing opened this issue Dec 21, 2022 · 3 comments · May be fixed by #47

Comments

@jklenzing
Copy link
Member

jklenzing commented Dec 21, 2022

Description

numpy 1.24 has dropped some deprecated features, in particular with respect to data access.

Potential impact

From unit tests for pandas data in pysatNASA:

>                   self.meta[var_name][attr_name] = data[i, 0:num_e]
E                   IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/pysatCDF/_cdf.py:572: IndexError

These errors do not appear when a version cap is applied.

Potential solution(s)

Update data standards.

Alternatives

😴

Additional context

Found in Github Actions testing. https://github.com/pysat/pysatNASA/actions/runs/3750994468/jobs/6371429123

@rstoneback
Copy link
Collaborator

Thanks for the report.

@jklenzing
Copy link
Member Author

jklenzing commented Jan 5, 2023

Validated that the same failure documented above appears in the unit tests here for develop-3 with numpy 1.24.1 in github actions. https://github.com/pysat/pysatCDF/actions/runs/3850046149/jobs/6559747390

@jklenzing
Copy link
Member Author

Since I can't test this locally, I took a wild guess that it was a chained index issue and tried to update the broken lines to

self.meta[var_name][attr_name] = data[i][0:num_e]

Verified the unit tests work for numpy 1.24.1. PR incoming.

@jklenzing jklenzing linked a pull request Jan 5, 2023 that will close this issue
11 tasks
@jklenzing jklenzing linked a pull request Apr 5, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants