home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "CONTRIBUTOR" and issue = 261403591 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • dnowacki-usgs 2

issue 1

  • Need better user control of _FillValue attribute in NetCDF files · 2 ✖

author_association 1

  • CONTRIBUTOR · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
333175863 https://github.com/pydata/xarray/issues/1598#issuecomment-333175863 https://api.github.com/repos/pydata/xarray/issues/1598 MDEyOklzc3VlQ29tbWVudDMzMzE3NTg2Mw== dnowacki-usgs 13837821 2017-09-29T16:37:07Z 2017-09-29T16:37:20Z CONTRIBUTOR

@jhamman In brief, it's weird.

Engine | encoding['_FillValue'] = False | Do nothing ----- | ----- | ----- netCDF4 | Filling off | Filling on scipy | Filling off | Filling off h5netcdf | Filling on | Filling off

So, this is some peculiar behavior. Setting _FillValue to False works for netCDF4 (as we have seen), has no effect using the scipy engine, and seems to do the opposite of intended for h5netcdf.

Code below:

``` import xarray as xr import numpy as np import pandas as pd

ds = xr.Dataset({'foo': (('x', 'y'), np.random.rand(4, 5))}, coords={'x': [10, 20, 30, 40], 'y': pd.date_range('2000-01-01', periods=5), 'z': ('x', list('abcd'))})

ds.to_netcdf('notset_scipy.nc', engine='scipy') ds.to_netcdf('notset_netcdf4.nc', engine='netcdf4') ds.to_netcdf('notset_h5netcdf.nc', engine='h5netcdf')

ds.y.encoding['_FillValue'] = False

ds.to_netcdf('False_scipy.nc', engine='scipy') ds.to_netcdf('False_netcdf4.nc', engine='netcdf4') ds.to_netcdf('False_h5netcdf.nc', engine='h5netcdf') ```

netCDF4 $ ncinfo -v y notset_netcdf4.nc <type 'netCDF4._netCDF4.Variable'> int64 y(y) units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian unlimited dimensions: current shape = (5,) filling on, default _FillValue of -9223372036854775806 used $ ncinfo -v y False_netcdf4.nc <type 'netCDF4._netCDF4.Variable'> int64 y(y) units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian unlimited dimensions: current shape = (5,) filling off

scipy $ ncinfo -v y notset_scipy.nc <type 'netCDF4._netCDF4.Variable'> int32 y(y) units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian unlimited dimensions: current shape = (5,) filling off

$ ncinfo -v y False_scipy.nc <type 'netCDF4._netCDF4.Variable'> int32 y(y) units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian _FillValue: 0 unlimited dimensions: current shape = (5,) filling off

h5netcdf $ ncinfo -v y notset_h5netcdf.nc <type 'netCDF4._netCDF4.Variable'> int64 y(y) units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian unlimited dimensions: current shape = (5,) filling off

$ ncinfo -v y False_h5netcdf.nc <type 'netCDF4._netCDF4.Variable'> int64 y(y) _FillValue: 0 units: days since 2000-01-01 00:00:00 calendar: proleptic_gregorian unlimited dimensions: current shape = (5,) filling on

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Need better user control of _FillValue attribute in NetCDF files 261403591
333165596 https://github.com/pydata/xarray/issues/1598#issuecomment-333165596 https://api.github.com/repos/pydata/xarray/issues/1598 MDEyOklzc3VlQ29tbWVudDMzMzE2NTU5Ng== dnowacki-usgs 13837821 2017-09-29T15:55:22Z 2017-09-29T15:55:22Z CONTRIBUTOR

Allowing {'_FillValue': False} to indicate that _FillValue should not be included would be a simple, easy fix, so we should probably do that regardless.

Correct me if you're talking about something different, but xarray already supports setting _FillValue to False to turn off filling. (Is there any use case where filling remains on but without a valid _FillValue?) For example, I have a netCDF processing routine using xarray. In the code I have the line for the lon dimension:

ds.lon.encoding['_FillValue'] = False

Which, for the relevant dimension, yields in ncinfo:

$ ncinfo -v lon yesfalse.nc <type 'netCDF4._netCDF4.Variable'> float64 lon(lon) units: degrees_east long_name: Longitude epic_code: 502 unlimited dimensions: current shape = (1,) filling off

If I comment out that line in my processing routine, I get the following:

$ ncinfo -v lon nofalse.nc <type 'netCDF4._netCDF4.Variable'> float64 lon(lon) _FillValue: nan units: degrees_east long_name: Longitude epic_code: 502 unlimited dimensions: current shape = (1,) filling on

I agree that changing from False to None does make better semantic sense.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Need better user control of _FillValue attribute in NetCDF files 261403591

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 14.174ms · About: xarray-datasette