-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Describe the bug
In the temperature.py module here, pvlib is using np.zeros_like which crucially returns the same type than the input.
In the unit tests, pvlib uses int instead of float values here. This leads to NumPy truncating the first float result produced (321.19 -> 321).
The final subtraction tmod_array - 273.15 then converts to a float, giving 321 - 273.15 = 47.85
That means, the results of the Fuentes functions will differ, depending on whether the input is an int or a float.
To Reproduce
Steps to reproduce the behavior:
Run the test_fuentes_timezone unit test with ints and then again with floats
Expected behavior
Ints and floats should produce the same results if they have the same value (i.e., 100 vs 100.0)
kandersolar, cwhanse, adriesse and kumaradityaapril
