From 1b3a328aaca2db23995c848d233b1ce41f53707e Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 12 May 2017 10:52:21 -0700 Subject: [PATCH 1/4] fix Location.get_clearsky for pandas 0.20 --- pvlib/location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/location.py b/pvlib/location.py index e83c8d14ca..217667b18f 100644 --- a/pvlib/location.py +++ b/pvlib/location.py @@ -191,7 +191,7 @@ def get_clearsky(self, times, model='ineichen', solar_position=None, Column names are: ``ghi, dni, dhi``. """ if dni_extra is None: - dni_extra = irradiance.extraradiation(times.dayofyear) + dni_extra = irradiance.extraradiation(times) try: pressure = kwargs.pop('pressure') From 13f774aa90e818d3ff4774587f5baca8da1b9057 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 12 May 2017 10:52:34 -0700 Subject: [PATCH 2/4] fix ephemeris for pandas 0.20 --- pvlib/solarposition.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pvlib/solarposition.py b/pvlib/solarposition.py index 263e373f10..4f4a972a93 100644 --- a/pvlib/solarposition.py +++ b/pvlib/solarposition.py @@ -616,10 +616,11 @@ def ephemeris(time, latitude, longitude, pressure=101325, temperature=12): DecHours = (time_utc.hour + time_utc.minute/60. + time_utc.second/3600. + time_utc.microsecond/3600.e6) - UnivDate = DayOfYear - UnivHr = DecHours + # np.array needed for pandas > 0.20 + UnivDate = np.array(DayOfYear) + UnivHr = np.array(DecHours) - Yr = time_utc.year - 1900 + Yr = np.array(time_utc.year) - 1900 YrBegin = 365 * Yr + np.floor((Yr - 1) / 4.) - 0.5 Ezero = YrBegin + UnivDate From d20c53ecc0bf795efe0ec902af9c3ceaeeb2ff98 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 12 May 2017 10:56:42 -0700 Subject: [PATCH 3/4] add whatsnew --- docs/sphinx/source/whatsnew.rst | 1 + docs/sphinx/source/whatsnew/v0.4.5.txt | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 docs/sphinx/source/whatsnew/v0.4.5.txt diff --git a/docs/sphinx/source/whatsnew.rst b/docs/sphinx/source/whatsnew.rst index bbb1958945..287e21ee83 100644 --- a/docs/sphinx/source/whatsnew.rst +++ b/docs/sphinx/source/whatsnew.rst @@ -6,6 +6,7 @@ What's New These are new features and improvements of note in each release. +.. include:: whatsnew/v0.4.5.txt .. include:: whatsnew/v0.4.4.txt .. include:: whatsnew/v0.4.3.txt .. include:: whatsnew/v0.4.2.txt diff --git a/docs/sphinx/source/whatsnew/v0.4.5.txt b/docs/sphinx/source/whatsnew/v0.4.5.txt new file mode 100644 index 0000000000..08a43a0976 --- /dev/null +++ b/docs/sphinx/source/whatsnew/v0.4.5.txt @@ -0,0 +1,17 @@ +.. _whatsnew_0450: + +v0.4.5 (May xx, 2017) +--------------------- + + +Bug fixes +~~~~~~~~~ + +* Fix pandas 0.20 incompatibilities in Location.get_clearsky, + solarposition.ephemeris (:issue:`293`) + + +Contributors +~~~~~~~~~~~~ + +* Will Holmgren From 8e4b7775d8caad1def640f3fc4404956f6291bbb Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 12 May 2017 10:57:50 -0700 Subject: [PATCH 4/4] fix whatsnew issue number --- docs/sphinx/source/whatsnew/v0.4.5.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.4.5.txt b/docs/sphinx/source/whatsnew/v0.4.5.txt index 08a43a0976..ca65a4f2c0 100644 --- a/docs/sphinx/source/whatsnew/v0.4.5.txt +++ b/docs/sphinx/source/whatsnew/v0.4.5.txt @@ -8,7 +8,7 @@ Bug fixes ~~~~~~~~~ * Fix pandas 0.20 incompatibilities in Location.get_clearsky, - solarposition.ephemeris (:issue:`293`) + solarposition.ephemeris (:issue:`325`) Contributors