Skip to content

Bugfix valueerror time dep hp cop#1929

Merged
fneum merged 6 commits intoPyPSA:masterfrom
jonathan-peel:bugfix-valueerror-time-dep-hp-cop
Dec 1, 2025
Merged

Bugfix valueerror time dep hp cop#1929
fneum merged 6 commits intoPyPSA:masterfrom
jonathan-peel:bugfix-valueerror-time-dep-hp-cop

Conversation

@jonathan-peel
Copy link
Copy Markdown
Contributor

@jonathan-peel jonathan-peel commented Dec 1, 2025

Closes #1928

Changes proposed in this Pull Request

  1. Ensure that cop_heat_pump is always a Pandas DataFrame object by using loc method with lists as inputs instead of at so that the call to clip doesn't break due to cop_heat_pump being a Numpy Float64 object.
  2. Ensure that the resulting value returned to n.add is a scalar again using squeeze.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to pixi.toml (using pixi add <dependency-name>).
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

Copy link
Copy Markdown
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

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

Good catch. Seems plausible to me that this was not caught earlier as I doubt many have run time_dep_hp_cop: false setting.

@fneum fneum enabled auto-merge (squash) December 1, 2025 14:28
auto-merge was automatically disabled December 1, 2025 14:28

Head branch was pushed to by a user without write access

@fneum fneum enabled auto-merge (squash) December 1, 2025 14:28
@fneum fneum merged commit 24705ca into PyPSA:master Dec 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError when time_dep_hp_cop: false and heating: true

2 participants