8000 compatibility for cftime==1.1 (#900) · Ahanmr/pvlib-python@734fbba · GitHub
[go: up one dir, main page]

Skip to content

Commit 734fbba

Browse files
authored
compatibility for cftime==1.1 (pvlib#900)
* compat for cftime 1.1 * unused import * whats new
1 parent 099e573 commit 734fbba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/sphinx/source/whatsnew/v0.7.2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Bug fixes
2929
`0.7.0 what's new <https://pvlib-python.readthedocs.io/en/stable/whatsnew.html#v0-7-0-december-18-2019>`_
3030
entries about changes to ``PVSystem.pvwatts_ac``. Delete unreleased
3131
0.6.4 what's new file. (:issue:`898`)
32+
* Compatibility with cftime 1.1. (:issue:`895`)
3233

3334
Documentation
3435
~~~~~~~~~~~~~

pvlib/forecast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
The 'forecast' module contains class definitions for
33
retreiving forecasted data from UNIDATA Thredd servers.
44
'''
5-
import datetime
65
from netCDF4 import num2date
76
import numpy as np
87
import pandas as pd
@@ -406,7 +405,8 @@ def set_time(self, time):
406405
-------
407406
pandas.DatetimeIndex
408407
'''
409-
times = num2date(time[:].squeeze(), time.units)
408+
times = num2date(time[:].squeeze(), time.units,
409+
only_use_cftime_datetimes=False)
410410
self.time = pd.DatetimeIndex(pd.Series(times), tz=self.location.tz)
411411

412412
def cloud_cover_to_ghi_linear(self, cloud_cover, ghi_clear, offset=35,

0 commit comments

Comments
 (0)
0