issues: 522397677
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
522397677 | MDU6SXNzdWU1MjIzOTc2Nzc= | 3521 | cftime_range example doesn't work | 15331990 | closed | 0 | 1 | 2019-11-13T18:31:26Z | 2019-11-13T18:34:43Z | 2019-11-13T18:34:43Z | CONTRIBUTOR | MCVE Code Sample
Expected OutputThe output from the example Problem Description```ValueError Traceback (most recent call last) <ipython-input-3-4ff834de4bd2> in <module> 1 import xarray as xr ----> 2 xr.cftime_range(start='2000', periods=6, freq='2MS', calendar='noleap') ~/anaconda3/envs/py3/lib/python3.7/site-packages/xarray/coding/cftime_offsets.py in cftime_range(start, end, periods, freq, normalize, name, closed, calendar) 961 962 if start is not None: --> 963 start = to_cftime_datetime(start, calendar) 964 start = _maybe_normalize_date(start, normalize) 965 if end is not None: ~/anaconda3/envs/py3/lib/python3.7/site-packages/xarray/coding/cftime_offsets.py in to_cftime_datetime(date_str_or_date, calendar) 677 "a calendar type must be provided" 678 ) --> 679 date, _ = _parse_iso8601_with_reso(get_date_type(calendar), date_str_or_date) 680 return date 681 elif isinstance(date_str_or_date, cftime.datetime): ~/anaconda3/envs/py3/lib/python3.7/site-packages/xarray/coding/cftimeindex.py in _parse_iso8601_with_reso(date_type, timestr) 114 # 1.0.3.4. 115 replace["dayofwk"] = -1 --> 116 return default.replace(**replace), resolution 117 118 cftime/_cftime.pyx in cftime._cftime.datetime.replace() ValueError: Replacing the dayofyr or dayofwk of a datetime is not supported. ``` Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3521/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |