Skip to content

Commit

Permalink
replacing deprecated in1d, using ravel for scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
quant12345 committed Oct 8, 2024
1 parent 735c243 commit 758f9fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 758f9fb

Please sign in to comment.