Closed uvchik closed 2 years ago
This PR should help to make the behaviour of the methods more explicit.
The following code should explain the new API. Method names are to be discussed :smile:
.from demandlib import bdew # read standard load profiles e_slp = bdew.ElecSlp(year=2020) print(e_slp.get_profiles("h0", "g0")) print(e_slp.get_profiles()) elec_demand = e_slp.scale_profiles({"h0": 5000, "g0": 3000}) print(elec_demand) print(elec_demand.sum()) print(elec_demand.sum(axis=1)) print(elec_demand.sum(axis=1).sum()) elec_power = e_slp.get_scaled_power_profiles({"h0": 5000, "g0": 3000}) print(elec_power) print(elec_power.sum().div(4)) print(elec_power.sum(axis=1)) print(elec_power.sum(axis=1).div(4).sum()) elec_power = e_slp.get_scaled_power_profiles( {"h0": 5000, "g0": 3000}, conversion_factor=0.5 ) print(elec_power) print(elec_power.sum().div(0.5))
Hello @uvchik! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
https://demandlib.readthedocs.io/en/features-revise-methods-for-elec-slp/bdew.html#electrical-profiles
This PR should help to make the behaviour of the methods more explicit.
The following code should explain the new API. Method names are to be discussed :smile: