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

BUG: use of indices in numpy 1.24.1 #47

Open
wants to merge 3 commits into
base: develop-3
Choose a base branch
from

Conversation

jklenzing
Copy link
Member

@jklenzing jklenzing commented Jan 5, 2023

Description

Addresses #46

numpy 1.24.1 doesn't like how the indices work.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This has only been tested via github actions. It needs a human in the loop to verify that data is loaded as expected. I cannot compile on my local machine.

Checklist:

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes
  • Update zenodo.json file for new code contributors

If this is a release PR, replace the first item of the above checklist with the
release checklist on the pysat wiki:
https://github.com/pysat/pysat/wiki/Checklist-for-Release

@jklenzing
Copy link
Member Author

The changelog was screwed up when I merged #41. Not sure how to fix this.

Pulled text from a previous commit
CHANGELOG.md Show resolved Hide resolved
@jklenzing
Copy link
Member Author

The changelog was screwed up when I merged #41. Not sure how to fix this.

OK, I pulled the text from before the merge. Essentially, the merge duplicated the 3.2 refs and added the 4.0 stuff to the second 3.2. Should be back up to standard now.

@jklenzing
Copy link
Member Author

@rstoneback, we have a numpy version cap at pysatNASA that needs a patch version here.

@jklenzing jklenzing linked an issue Apr 5, 2023 that may be closed by this pull request
@@ -569,7 +569,7 @@ def _process_return_multi_z_attr(self, data, attr_names, var_names,
chars.append('*')
self.meta[var_name][attr_name] = ''.join(chars).rstrip()
else:
self.meta[var_name][attr_name] = data[i, 0:num_e]

Choose a reason for hiding this comment

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

I'm happy with this change. But I don't think I understand why this was producing an error.
The documentation for indexing has examples in the "Advanced Indexing" section that look the same as data[i, 0:num_e].

Copy link
Collaborator

Choose a reason for hiding this comment

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

I also see data access examples like data[I, j] in the documentation. I don't quite understand why this change is needed.

@jklenzing
Copy link
Member Author

Just going to drop a little reminder that all versions of numpy currently supported by pysatCDF have officially reached end of life as of 24 Jun 2024.
https://endoflife.date/numpy

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.

MAINT: numpy 1.24 compliance
3 participants