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

replacing deprecated in1d, using ravel for scalars #882

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Next release

- [#882](https://github.com/IAMconsortium/pyam/pull/882) Replacing deprecated in1d, using ravel for scalars
- [#880](https://github.com/IAMconsortium/pyam/pull/880) Use `pd.Series.iloc[pos]` for forward-compatibility
- [#877](https://github.com/IAMconsortium/pyam/pull/xxx) Support `engine` and other `pd.ExcelFile` keywords.

Expand Down
2 changes: 1 addition & 1 deletion pyam/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def assign_style_props(df, color=None, marker=None, linestyle=None, cmap=None):
values = list(d.values())
# find if any colors in our properties corresponds with special colors
# we know about
overlap_idx = np.in1d(values, list(PYAM_COLORS.keys()))
overlap_idx = np.isin(values, list(PYAM_COLORS.keys()))
if overlap_idx.any(): # some exist in our special set
keys = np.array(list(d.keys()))[overlap_idx]
values = np.array(values)[overlap_idx]
Expand Down
2 changes: 1 addition & 1 deletion pyam/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def cross_threshold(

# it year (as int) is returned, add one because int() rounds down
if return_type is int:
return [y + 1 for y in map(int, years)]
return [y + 1 for y in map(int, years.ravel())]
return years


Expand Down