Skip to content
Merged
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
4 changes: 1 addition & 3 deletions src/muse/investments.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ def scipy_match_demand(

from muse.constraints import ScipyAdapter

df_technologies = technologies.to_dataframe()
Copy link
Collaborator

Choose a reason for hiding this comment

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

So... is this not needed anymore?

Copy link
Collaborator Author

@tsmbland tsmbland Jul 5, 2024

Choose a reason for hiding this comment

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

Nope. Previously it was converting the xarray to a dataframe and then getting the list of technologies from the dataframe, but you can get this directly from the xarray (and the dataframe isn't used anywhere else)


if "timeslice" in costs.dims and timeslice_op is not None:
costs = timeslice_op(costs)
if "year" in technologies.dims and year is None:
Expand Down Expand Up @@ -342,7 +340,7 @@ def scipy_match_demand(
msg = (
res.message
+ "\n"
+ f"Error in sector containing {df_technologies.technology.unique()}"
+ f"Error in sector containing {technologies.technology.values}"
)
getLogger(__name__).critical(msg)
raise GrowthOfCapacityTooConstrained
Expand Down