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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@ Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

[0.3.2] - 2022-05-13
[0.4.0] - 2023-XX-XX
--------------------
* New Features
* Compatible with pysat v3.0+
* Deprecations
* Documentation
* Added pull request templates and other GitHub project documentation.
* Switched Windows installation instructions to favor installing WSL.
* Bug Fix
jklenzing marked this conversation as resolved.
Show resolved Hide resolved
* Improved builds for newer compilers.
* Replaces uninterpretable characters with '*' so data loading may continue.
* Removed chained indices for improved compliance with numpy 1.24 and greater
* Maintenance
* Adopted latest pysat development standards.
* Shifted from TravisCI to GitHub Actions for online testing.
* Adopted setup.cfg
* Improved PEP8 compliance
* Adopt pytest syntax

[0.3.2] - 2022-05-13
Expand Down
2 changes: 1 addition & 1 deletion pysatCDF/_cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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

def to_pysat(self, flatten_twod=True, units_label='UNITS',
name_label='LONG_NAME', fill_label='FILLVAL',
Expand Down