home / github / pull_requests

Menu
  • Search all tables
  • GraphQL API

pull_requests: 82453739

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
82453739 MDExOlB1bGxSZXF1ZXN0ODI0NTM3Mzk= 984 closed 0 fix datetime issues 10194086 fixes: #975 work around: pydata/pandas#14068 I finally found 3 issues: (1) pretty print fails when date is out of bounds (2) pandas Overflow error (https://github.com/pydata/pandas/issues/14068) (3) decode_cf_datetime when first date is in bound but later dates are not ``` import xarray as xr from datetime import datetime # (1) pretty print xr.core.formatting.format_timestamp(datetime(2800, 1, 1)) # (2) overflow error ds = xr.Dataset(coords={'time' : [0, 266 * 365]}) units = 'days since 2000-01-01 00:00:00' ds.time.attrs = dict(units=units) ds_decoded = xr.conventions.decode_cf(ds) ds_decoded.time import netCDF4 as nc import numpy as np import xarray as xr # (3) create netCDF file ncf = nc.Dataset('test_future.nc', 'w') ncf.createDimension('time') ncf.createVariable('time', np.int, dimensions=('time')) ncf.variables['time'].units = 'days since 1850-01-01 00:00:00' ncf.variables['time'].calendar = 'standard' ncf.variables['time'][:] = np.arange(850) * 365 ncf.close() # open with xr ds = xr.open_dataset('test_future.nc') # this works ds # ds.time is a datetime64[ns] object # this fails ds.time ``` 2016-08-23T22:40:03Z 2016-08-26T06:57:39Z 2016-08-25T22:39:26Z 2016-08-25T22:39:26Z 6cf5d0c73cb4e018184d058f6349eb046aa155fd     0 b552b28eda4f14dd59327f7550c43183818c6318 97e69dcccc212c90434a21b301984638eb713b12 MEMBER   13221727 https://github.com/pydata/xarray/pull/984  

Links from other tables

  • 0 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.747ms