8000 FutureWarning: Adjust float conversion to resolve deprecation warning in heat_building.py · Issue #53 · oemof/oemof-demand · GitHub
[go: up one dir, main page]

Skip to content

FutureWarning: Adjust float conversion to resolve deprecation warning in heat_building.py #53

Open

Description

@Stefanie08

During the run of the function get_sigmoid_parameters() in heating_building.py the following FutureWarning is raised:

FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead

The warning concerns the script between lines 271-275.

        a = float(sigmoid["parameter_a"])
        b = float(sigmoid["parameter_b"])
        c = float(sigmoid["parameter_c"])
        if self.ww_incl:
            d = float(sigmoid["parameter_d"])

I ran this script through the oemof-B3 model with a Windows 10 operating system and Python 3.10.12
This could be adapted to avoid TypeErrors.

Activity

  1. ddceruti commented on Oct 25, 2023

    @ddceruti
    Contributor

    My latest pull request addresses this issue directly #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0