Skip to content

Commit

Permalink
Add default of same type as choicelist for np.select()
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Nov 11, 2024
1 parent b379ff7 commit 62cc441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message_ix_models/model/water/data/demands.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def add_sectoral_demands(context: "Context") -> dict[str, pd.DataFrame]:
]
# create a new column and use np.select to assign
# values to it using our lists as arguments
h_act["commodity"] = np.select(conditions, values)
h_act["commodity"] = np.select(conditions, values, "Unknown technology")
h_act["value"] = h_act["value"].abs()

hist_act = make_df(
Expand Down

0 comments on commit 62cc441

Please sign in to comment.