Skip to content

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar commented Oct 1, 2020

Works locally, seeing if the CI likes it.

@@ -599,7 +599,8 @@ def fuentes(poa_global, temp_air, wind_speed, noct_installed, module_height=5,
# n.b. the way Fuentes calculates the first timedelta makes it seem like
# the value doesn't matter -- rather than recreate it here, just assume
# it's the same as the second timedelta:
timedelta_hours = np.diff(poa_global.index).astype(float) / 1e9 / 60 / 60
timedeltas = (poa_global.index[1:] - poa_global.index[:-1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this equivalent to poa_global.index.to_series().diff().total_seconds() / 3600?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type is different (series vs index), but that doesn't matter in this context. With timedelta_hours.iloc[0] = timedelta_hours.iloc[1], the two are equivalent, so I'll use yours 👍

@wholmgren wholmgren added this to the 0.8.1 milestone Oct 8, 2020
@wholmgren wholmgren added the bug label Oct 8, 2020
@wholmgren wholmgren merged commit f8b9c04 into pvlib:master Oct 9, 2020
@kandersolar kandersolar deleted the fuentes_tz branch October 9, 2020 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

temperature.fuentes errors when given tz-aware inputs on pandas>=1.0.0
2 participants