Skip to content

Commit 653e521

Browse files
committed
fix doctests
1 parent c273f1c commit 653e521

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

windpowerlib/modelchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class ModelChain(object):
9191
... 'rotor_diameter': 127,
9292
... 'turbine_name': 'ENERCON E 126 7500'}
9393
>>> e126 = wind_turbine.WindTurbine(**enerconE126)
94-
>>> modelchain_data = {'rho_model': 'ideal_gas'}
95-
>>> e126_md = modelchain.ModelChain(e126, **modelchain_data)
96-
>>> print(e126.rotor_diameter)
94+
>>> modelchain_data = {'density_model': 'ideal_gas'}
95+
>>> e126_mc = modelchain.ModelChain(e126, **modelchain_data)
96+
>>> print(e126_mc.wind_turbine.rotor_diameter)
9797
127
9898
9999
"""

windpowerlib/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def linear_interpolation_extrapolation(df, target_height):
5959
... np.array([10, 80])])
6060
>>> linear_interpolation_extrapolation(
6161
... weather_df['wind_speed'], 100)[0]
62-
6.857143
62+
6.8571428571428577
6363
6464
"""
6565
# find closest heights

windpowerlib/wind_turbine.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ def get_turbine_types(print_out=True, **kwargs):
236236
Examples
237237
--------
238238
>>> from windpowerlib import wind_turbine
239-
>>> valid_types_df = wind_turbine.get_turbine_types(print_out=False)
240-
>>> print(valid_types_df.iloc[5])
241-
turbine_id DEWIND D8 2000
242-
p_nom 2000
243-
Name: 5, dtype: object
239+
>>> turbines = wind_turbine.get_turbine_types(print_out=False)
240+
>>> print(turbines[turbines["turbine_id"].str.contains("ENERCON")].iloc[0])
241+
turbine_id ENERCON E 101 3000
242+
p_nom 3000
243+
Name: 25, dtype: object
244244
245245
"""
246246
df = read_turbine_data(**kwargs)

0 commit comments

Comments
 (0)