Skip to content

Commit 7851834

Browse files
committed
fix doctests
1 parent a838261 commit 7851834

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

windpowerlib/modelchain.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
__license__ = "GPLv3"
1010

1111
import logging
12-
from . import wind_speed, density, temperature, power_output, tools
12+
from windpowerlib import wind_speed, density, temperature, power_output, tools
1313

1414

1515
class ModelChain(object):
@@ -88,7 +88,8 @@ class ModelChain(object):
8888
>>> enerconE126 = {
8989
... 'hub_height': 135,
9090
... 'rotor_diameter': 127,
91-
... 'object_name': 'ENERCON E 126 7500'}
91+
... 'object_name': 'ENERCON E 126 7500',
92+
... 'fetch_curve': 'power_curve'}
9293
>>> e126 = wind_turbine.WindTurbine(**enerconE126)
9394
>>> modelchain_data = {'density_model': 'ideal_gas'}
9495
>>> e126_mc = modelchain.ModelChain(e126, **modelchain_data)

windpowerlib/tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def linear_interpolation_extrapolation(df, target_height):
5959
... columns=[np.array(['wind_speed',
6060
... 'wind_speed']),
6161
... np.array([10, 80])])
62-
>>> linear_interpolation_extrapolation(
63-
... weather_df['wind_speed'], 100)[0]
64-
6.8571428571428577
62+
>>> round(linear_interpolation_extrapolation(
63+
... weather_df['wind_speed'], 100)[0], 10)
64+
6.8571428571
6565
6666
"""
6767
# find closest heights

0 commit comments

Comments
 (0)