home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1525766244

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/7790#issuecomment-1525766244 https://api.github.com/repos/pydata/xarray/issues/7790 1525766244 IC_kwDOAMm_X85a8Vhk 14983768 2023-04-27T14:08:37Z 2023-04-27T14:08:37Z NONE

Ah! Okay. I did not know about the .encoding option, which does indeed have the fill value. Thank you.

Interestingly, -9.223372036854776e+18 is just the float equivalent of numpy.datetime64('NaT'):

python float(np.datetime64('NaT').view('i8')) -9.223372036854776e+18

And I know this isn't an issue with zarr and NaT because I can create the zarr store directly with the zarr library and it's perfectly happy: ```python

Create a zarr store directly with numpy.datetime64 type

location_zarr_direct = "from_zarr.zarr" root = zarr.open(location_zarr_direct,mode='w') z_time_array = root.create_dataset( "time",data=time,shape=time.shape,chunks=time.shape,dtype=time.dtype, fill_value=time_fill_value ) zarr.convenience.consolidate_metadata(location_zarr_direct)

Read it back out again

read_zarr = zarr.open(location_zarr_direct,mode='r') print(read_zarr["time"][:]) [ 'NaT' '2023-01-02T00:00:00.000000000'] ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1685803922
Powered by Datasette · Queries took 1.17ms · About: xarray-datasette