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..ca65a4f2c0 --- /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:`325`) + + +Contributors +~~~~~~~~~~~~ + +* Will Holmgren 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') 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