Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pvlib/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,8 @@
# behave well if wind == 0?
windmod_array = wind_speed * (module_height/wind_height)**0.2 + 1e-4

tmod0 = 293.15

Check failure on line 886 in pvlib/temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E251 unexpected spaces around keyword / parameter equals

Check failure on line 886 in pvlib/temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E251 unexpected spaces around keyword / parameter equals
tmod_array = np.zeros_like(poa_global)
tmod_array = np.zeros_like(poa_global, dtype = float)

iterator = zip(tamb_array, sun_array, windmod_array, tsky_array,
timedelta_hours)
Expand Down
15 changes: 15 additions & 0 deletions tests/test_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,21 @@
assert night_difference.max() < 6
assert night_difference.min() > 0

def test_fuentes_int_float_consistency():

Check failure on line 263 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E302 expected 2 blank lines, found 1
"""Test that int and float inputs give identical results after dtype fix."""

Check failure on line 264 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E501 line too long (80 > 79 characters)
index = pd.date_range('2020-01-01', periods=3, freq='h')

Check failure on line 266 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

W293 blank line contains whitespace
poa_int = pd.Series([800, 800, 800], index=index, dtype=int)
poa_float = pd.Series([800.0, 800.0, 800.0], index=index)
temp_air = pd.Series([25.0, 25.0, 25.0], index=index)
wind_speed = pd.Series([1.0, 1.0, 1.0], index=index)

Check failure on line 271 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

W293 blank line contains whitespace
out_int = temperature.fuentes(poa_int, temp_air, wind_speed, noct_installed=45)

Check failure on line 272 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E501 line too long (83 > 79 characters)
out_float = temperature.fuentes(poa_float, temp_air, wind_speed, noct_installed=45)

Check failure on line 273 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E501 line too long (87 > 79 characters)

Check failure on line 274 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

W293 blank line contains whitespace
# Check outputs are identical within floating-point tolerance
pd.testing.assert_series_equal(out_int, out_float, check_exact=False, rtol=1e-10)

Check failure on line 276 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E501 line too long (85 > 79 characters)


@pytest.mark.parametrize('tz', [None, 'Etc/GMT+5'])
def test_fuentes_timezone(tz):
Expand Down
Loading