Skip to content

Commit 5a8ee66

Browse files
committed
Change and fix doctests
1 parent 653e521 commit 5a8ee66

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

windpowerlib/modelchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ class ModelChain(object):
9393
>>> e126 = wind_turbine.WindTurbine(**enerconE126)
9494
>>> modelchain_data = {'density_model': 'ideal_gas'}
9595
>>> e126_mc = modelchain.ModelChain(e126, **modelchain_data)
96-
>>> print(e126_mc.wind_turbine.rotor_diameter)
97-
127
96+
>>> print(e126_mc.density_model)
97+
ideal_gas
9898
9999
"""
100100

windpowerlib/wind_turbine.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class WindTurbine(object):
8181
... 'rotor_diameter': 127,
8282
... 'turbine_name': 'ENERCON E 126 7500'}
8383
>>> e126 = wind_turbine.WindTurbine(**enerconE126)
84-
>>> print(e126.rotor_diameter)
85-
127
84+
>>> print(e126.nominal_power)
85+
7500000
8686
8787
"""
8888

@@ -126,12 +126,12 @@ def fetch_turbine_data(self):
126126
... 'hub_height': 135,
127127
... 'rotor_diameter': 127,
128128
... 'turbine_name': 'ENERCON E 126 7500',
129-
... 'fetch_curve': 'cp'}
129+
... 'fetch_curve': 'power_coefficient_curve'}
130130
>>> e126 = wind_turbine.WindTurbine(**enerconE126)
131-
>>> print(e126.cp_values[5.0])
131+
>>> print(e126.power_coefficient_curve['values'][5])
132132
0.423
133133
>>> print(e126.nominal_power)
134-
7500000000.0
134+
7500000
135135
136136
"""
137137

@@ -239,7 +239,7 @@ def get_turbine_types(print_out=True, **kwargs):
239239
>>> turbines = wind_turbine.get_turbine_types(print_out=False)
240240
>>> print(turbines[turbines["turbine_id"].str.contains("ENERCON")].iloc[0])
241241
turbine_id ENERCON E 101 3000
242-
p_nom 3000
242+
p_nom 3000000
243243
Name: 25, dtype: object
244244
245245
"""

0 commit comments

Comments
 (0)