home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

31 rows where user = 13837821 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 13

  • Recreate @gajomi's #2070 to keep attrs when calling astype() 10
  • Implement load_dataset() and load_dataarray() 4
  • Implement setncattr_string for attributes that are lists of strings 3
  • Need better user control of _FillValue attribute in NetCDF files 2
  • Safely open / close netCDF files without resource locking 2
  • Partial fix for #2841 to improve formatting. 2
  • interpolate_na: Add max_gap support. 2
  • Feature request: writing xarray list-type attributes to netCDF 1
  • Keep attrs in call to astype 1
  • unlimited_dims generates 0-length dimensions named as letters of unlimited dimension 1
  • Key error in to_netcdf 1
  • Fix and add test for groupby_bins() isnan TypeError. 1
  • Dimension attrs lost when creating new variable with that dimension 1

user 1

  • dnowacki-usgs · 31 ✖

author_association 1

  • CONTRIBUTOR 31
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
685855523 https://github.com/pydata/xarray/issues/4393#issuecomment-685855523 https://api.github.com/repos/pydata/xarray/issues/4393 MDEyOklzc3VlQ29tbWVudDY4NTg1NTUyMw== dnowacki-usgs 13837821 2020-09-02T16:36:11Z 2020-09-02T16:37:06Z CONTRIBUTOR

Huh, I would not have expected that behavior. To my mind, it seems unwanted, but then again I don't totally follow the nuances of #2180. Thanks for the heads up.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dimension attrs lost when creating new variable with that dimension 689384366
676579147 https://github.com/pydata/xarray/pull/4314#issuecomment-676579147 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU3OTE0Nw== dnowacki-usgs 13837821 2020-08-19T18:08:12Z 2020-08-19T18:09:33Z CONTRIBUTOR

Ah, I see, merge instead of rebase. I'll try that next time.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
676571966 https://github.com/pydata/xarray/pull/4314#issuecomment-676571966 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU3MTk2Ng== dnowacki-usgs 13837821 2020-08-19T17:53:14Z 2020-08-19T17:53:55Z CONTRIBUTOR

Ugh, sorry about that. I'm following the instructions in contributing to xarray. It's a fetch/rebase. Happy to do it another way if there is a better practice. Thanks.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
676548419 https://github.com/pydata/xarray/pull/4314#issuecomment-676548419 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU0ODQxOQ== dnowacki-usgs 13837821 2020-08-19T17:05:33Z 2020-08-19T17:06:29Z CONTRIBUTOR

Updated the try/except following @keewis's lead. Also sparse 0.11.0 has been released so I was able to check that the warning is correctly issued for 0.10.0, then I upgraded, and the warning is no longer issued (and sparse doesn't choke on the casting kwarg).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
674191679 https://github.com/pydata/xarray/pull/4314#issuecomment-674191679 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NDE5MTY3OQ== dnowacki-usgs 13837821 2020-08-14T17:52:52Z 2020-08-14T17:52:52Z CONTRIBUTOR

Thanks for the review @dcherian. I modified the tests as suggested and added some docstring updates. Let me know what you think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
673640237 https://github.com/pydata/xarray/pull/4314#issuecomment-673640237 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MzY0MDIzNw== dnowacki-usgs 13837821 2020-08-13T18:29:48Z 2020-08-13T18:29:48Z CONTRIBUTOR

Did a fetch and rebase, not sure why commits from other PRs added to master in the meantime show up in this one 🤷

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
672129254 https://github.com/pydata/xarray/pull/4314#issuecomment-672129254 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MjEyOTI1NA== dnowacki-usgs 13837821 2020-08-11T17:46:30Z 2020-08-11T17:46:30Z CONTRIBUTOR

I think(?) the pep warnings are from the commits @max-sixty pushed several days ago during testing

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670769708 https://github.com/pydata/xarray/pull/4314#issuecomment-670769708 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDc2OTcwOA== dnowacki-usgs 13837821 2020-08-07T22:32:10Z 2020-08-07T22:32:10Z CONTRIBUTOR

Maybe I am overcomplicating things but I came up with this solution:

Catch the error. If it is the unallowed casting kwarg error, and we are dealing with a sparse array, pop the casting kwarg and issue a RuntimeWarning that we are doing so. Otherwise, raise the original error since it might be something else non-sparse related.

Does that seem reasonable?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670197090 https://github.com/pydata/xarray/pull/4314#issuecomment-670197090 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDE5NzA5MA== dnowacki-usgs 13837821 2020-08-06T21:18:40Z 2020-08-06T21:18:40Z CONTRIBUTOR

My solution of try/except and popping casting from kwargs felt a bit kludgey, so I'm definitely open to other ideas. Letting it raise and xfailing the test would mean that we can no longer perform astype on sparse arrays until a new sparse version is released in the future. Though I suppose that would depends on the next xarray vs sparse release timeline.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670148385 https://github.com/pydata/xarray/pull/4314#issuecomment-670148385 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDE0ODM4NQ== dnowacki-usgs 13837821 2020-08-06T19:26:48Z 2020-08-06T19:26:48Z CONTRIBUTOR

Nice! Thanks a million @dcherian for raising that issue over at sparse.

@max-sixty regarding the minimum version, it seems like sparse has a relatively infrequent release cycle (many months) so it could be a while before we have a minimum version to require. Could we check whether we are dealing with a sparse array and call the numpy method instead for that use case, until sparse supports it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
669599057 https://github.com/pydata/xarray/pull/4314#issuecomment-669599057 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY2OTU5OTA1Nw== dnowacki-usgs 13837821 2020-08-05T23:37:07Z 2020-08-05T23:37:07Z CONTRIBUTOR

Thanks @max-sixty. I pushed a second commit, including adding a keep_attrs argument so people can keep the old behavior of losing the attrs. I added a bit more testing on for general astype behavior, checking dtypes are correct and values are similar.

What do you make of the failing tests in test_sparse.py (test_dataarray_method and test_variable_method)? I'm not really familiar enough with the pytest parametrize syntax to figure out what's going on.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
668279630 https://github.com/pydata/xarray/pull/2070#issuecomment-668279630 https://api.github.com/repos/pydata/xarray/issues/2070 MDEyOklzc3VlQ29tbWVudDY2ODI3OTYzMA== dnowacki-usgs 13837821 2020-08-03T22:54:22Z 2020-08-03T22:54:22Z CONTRIBUTOR

Just ran into this issue.

If it's really just a matter of expanding tests and resolving conflicts of @gajomi's PR to the current codebase I can take this on, but I don't want to take their credit. Is there an easy way for a non-owner to modify a PR or should I submit a new one?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep attrs in call to astype 316461072
549595749 https://github.com/pydata/xarray/pull/3302#issuecomment-549595749 https://api.github.com/repos/pydata/xarray/issues/3302 MDEyOklzc3VlQ29tbWVudDU0OTU5NTc0OQ== dnowacki-usgs 13837821 2019-11-04T23:34:12Z 2019-11-04T23:34:12Z CONTRIBUTOR

Thanks for all your work @dcherian! Did a quick test with some real-world timeseries data I've been wanting to use with max_gap and it looks good to me. I will definitely be using this in the future! 👍

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interpolate_na: Add max_gap support. 492866552
544001746 https://github.com/pydata/xarray/issues/3374#issuecomment-544001746 https://api.github.com/repos/pydata/xarray/issues/3374 MDEyOklzc3VlQ29tbWVudDU0NDAwMTc0Ng== dnowacki-usgs 13837821 2019-10-18T23:20:56Z 2019-10-18T23:20:56Z CONTRIBUTOR

The NC_STRING type enables arrays of strings to be serialized as attributes in nc files. NC_STRING is not in netcdf3, only netcdf4, so @jhamman is right. xarray has supported NC_STRING in conjunction with netcdf4 since 0.10.4. Not sure how it wasn't throwing an error for @jsadler2 on 0.12.1 sans netcdf4 🤷‍♂.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Key error in to_netcdf  502720385
543393942 https://github.com/pydata/xarray/pull/3302#issuecomment-543393942 https://api.github.com/repos/pydata/xarray/issues/3302 MDEyOklzc3VlQ29tbWVudDU0MzM5Mzk0Mg== dnowacki-usgs 13837821 2019-10-17T22:48:45Z 2019-10-17T22:51:36Z CONTRIBUTOR

Thanks so much for taking this on. Not sure how I missed the notification that you had done so.

@dcherian I checked out your branch and did some testing and found that testing this against dim="x" fails with a ValueError. ```python arr = np.array([ [np.nan, np.nan, np.nan, 1, 2, 3, 4, np.nan, 6, 7, np.nan, np.nan, np.nan, 11, np.nan, np.nan, ], [np.nan, np.nan, np.nan, 1, 2, 3, np.nan, np.nan, 6, 7, np.nan, np.nan, np.nan, 11, np.nan, np.nan, ], [np.nan, np.nan, np.nan, 1, 2, 3, np.nan, np.nan, 6, 7, np.nan, np.nan, np.nan, 11, np.nan, np.nan, ], [np.nan, np.nan, np.nan, 1, 2, 3, 4, np.nan, 6, 7, np.nan, np.nan, np.nan, 11, np.nan, np.nan, ], ])

da = xr.DataArray(arr, dims=["x", "y"], coords={"x": np.arange(arr.shape[0]), "y": np.arange(arr.shape[1])})

actual = da.interpolate_na("y", max_gap=2) # this works as in your test example actual = da.interpolate_na("x", max_gap=2) # this fails Error:

actual = da.interpolate_na("x", max_gap=2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/dnowacki/Documents/xarray/xarray/core/dataarray.py", line 2026, in interpolate_na **kwargs File "/Users/dnowacki/Documents/xarray/xarray/core/missing.py", line 302, in interp_na nan_block_lengths = _get_nan_block_lengths(self, dim, index) File "/Users/dnowacki/Documents/xarray/xarray/core/missing.py", line 23, in _get_nan_block_lengths arange = ones_like(obj) * index + (index[1] - index[0]) File "/Users/dnowacki/Documents/xarray/xarray/core/dataarray.py", line 2500, in func if not reflexive File "/Users/dnowacki/Documents/xarray/xarray/core/variable.py", line 1884, in func if not reflexive ValueError: operands could not be broadcast together with shapes (4,16) (4,) ```

I fixed it by changing this line https://github.com/dcherian/xarray/blob/8899f05a13533e10c8972836afda089b5b792ca0/xarray/core/missing.py#L23 to this: python if index.shape[0] == obj.shape[0]: arange = ones_like(obj) * index[:, None] + (index[1] - index[0]) else: arange = ones_like(obj) * index + (index[1] - index[0]) Does this seem reasonable?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interpolate_na: Add max_gap support. 492866552
543357612 https://github.com/pydata/xarray/pull/3405#issuecomment-543357612 https://api.github.com/repos/pydata/xarray/issues/3405 MDEyOklzc3VlQ29tbWVudDU0MzM1NzYxMg== dnowacki-usgs 13837821 2019-10-17T20:54:20Z 2019-10-17T20:54:20Z CONTRIBUTOR

Thanks @dcherian. I think this one's ready to go.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix and add test for groupby_bins() isnan TypeError. 507540721
490321133 https://github.com/pydata/xarray/pull/2917#issuecomment-490321133 https://api.github.com/repos/pydata/xarray/issues/2917 MDEyOklzc3VlQ29tbWVudDQ5MDMyMTEzMw== dnowacki-usgs 13837821 2019-05-08T02:17:52Z 2019-05-08T02:17:52Z CONTRIBUTOR

Sounds good. This latest commit un-deprecates tutorial.load_dataset() and makes it parallel to xarray.load_dataset() in terms of functionality.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement load_dataset() and load_dataarray() 436999500
488369088 https://github.com/pydata/xarray/pull/2917#issuecomment-488369088 https://api.github.com/repos/pydata/xarray/issues/2917 MDEyOklzc3VlQ29tbWVudDQ4ODM2OTA4OA== dnowacki-usgs 13837821 2019-05-01T18:28:44Z 2019-05-01T18:28:44Z CONTRIBUTOR

Got it, thanks. I can make this change, assuming the dask argument used for deprecating it in the first place isn't stronger than maintaining this consistency.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement load_dataset() and load_dataarray() 436999500
487810525 https://github.com/pydata/xarray/pull/2917#issuecomment-487810525 https://api.github.com/repos/pydata/xarray/issues/2917 MDEyOklzc3VlQ29tbWVudDQ4NzgxMDUyNQ== dnowacki-usgs 13837821 2019-04-30T03:21:21Z 2019-04-30T03:21:21Z CONTRIBUTOR

Forgive me, I don't understand what you mean by download vs open. I see that tutorial.load_dataset() is different from this PR in that it keeps the file handle open instead of closing it. Is that the distinction you are referring to? Otherwise all the gallery/examples I have checked call tutorial.load_dataset() at the beginning and that's it. Unless I'm missing something?

https://github.com/pydata/xarray/blob/6d93a95d05bdbfc33fff24064f67d29dd891ab58/xarray/tutorial.py#L92-L107

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement load_dataset() and load_dataarray() 436999500
487449159 https://github.com/pydata/xarray/pull/2917#issuecomment-487449159 https://api.github.com/repos/pydata/xarray/issues/2917 MDEyOklzc3VlQ29tbWVudDQ4NzQ0OTE1OQ== dnowacki-usgs 13837821 2019-04-29T04:32:27Z 2019-04-29T04:32:27Z CONTRIBUTOR

Seems like undeprecating it makes sense as a function with identical functionality is being added here. What if we just imported the new load_dataset as xarray.tutorial.load_dataset for the purposes of the tutorial?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement load_dataset() and load_dataarray() 436999500
486511229 https://github.com/pydata/xarray/issues/2887#issuecomment-486511229 https://api.github.com/repos/pydata/xarray/issues/2887 MDEyOklzc3VlQ29tbWVudDQ4NjUxMTIyOQ== dnowacki-usgs 13837821 2019-04-25T03:57:59Z 2019-04-25T03:57:59Z CONTRIBUTOR

Took a stab at implementing these functions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Safely open / close netCDF files without resource locking 432019600
484951848 https://github.com/pydata/xarray/pull/2906#issuecomment-484951848 https://api.github.com/repos/pydata/xarray/issues/2906 MDEyOklzc3VlQ29tbWVudDQ4NDk1MTg0OA== dnowacki-usgs 13837821 2019-04-19T16:38:48Z 2019-04-19T16:38:48Z CONTRIBUTOR

Good to go as far as I'm concerned. I'm not even sure how I'd phrase these changes in whats-new, so let's go with it as-is.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Partial fix for #2841 to improve formatting. 434599855
484605054 https://github.com/pydata/xarray/pull/2906#issuecomment-484605054 https://api.github.com/repos/pydata/xarray/issues/2906 MDEyOklzc3VlQ29tbWVudDQ4NDYwNTA1NA== dnowacki-usgs 13837821 2019-04-18T17:34:24Z 2019-04-18T17:34:24Z CONTRIBUTOR

Thanks @shoyer. I think numeric indexes are clearer, though maybe not cleaner. Removed them and fixed the dask CI test I didn't catch the first time through. Hopefully everything passes now. 🤞

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Partial fix for #2841 to improve formatting. 434599855
483012030 https://github.com/pydata/xarray/issues/2887#issuecomment-483012030 https://api.github.com/repos/pydata/xarray/issues/2887 MDEyOklzc3VlQ29tbWVudDQ4MzAxMjAzMA== dnowacki-usgs 13837821 2019-04-14T16:32:21Z 2019-04-14T16:32:21Z CONTRIBUTOR

I used to use the autoclose=True argument to open_dataset() all the time to avoid this issue. Then it was deprecated with the LRU introduction, and I now do a two-line ds = open_dataset().load() and then ds.close(). Just adding my use-case and what I found to be a regression in terms of usability. Something like load_dataset() would be helpful but I wonder if adding an argument to the existing open_dataset() would be better.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Safely open / close netCDF files without resource locking 432019600
389295812 https://github.com/pydata/xarray/issues/2134#issuecomment-389295812 https://api.github.com/repos/pydata/xarray/issues/2134 MDEyOklzc3VlQ29tbWVudDM4OTI5NTgxMg== dnowacki-usgs 13837821 2018-05-15T20:05:14Z 2018-05-15T20:05:14Z CONTRIBUTOR

Yep that does it, thanks! :thumbsup:

I guess I could have read the "sequence of str" description in the docs more closely. Maybe it would make sense to accept a single string in addition to a sequence of strings?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unlimited_dims generates 0-length dimensions named as letters of unlimited dimension 323357664
381742272 https://github.com/pydata/xarray/pull/2045#issuecomment-381742272 https://api.github.com/repos/pydata/xarray/issues/2045 MDEyOklzc3VlQ29tbWVudDM4MTc0MjI3Mg== dnowacki-usgs 13837821 2018-04-16T20:42:01Z 2018-04-16T20:42:01Z CONTRIBUTOR

@shoyer Thank you for the helpful feedback. I think I addressed all of your comments, and also expanded the tests.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement setncattr_string for attributes that are lists of strings 312693611
380239938 https://github.com/pydata/xarray/pull/2045#issuecomment-380239938 https://api.github.com/repos/pydata/xarray/issues/2045 MDEyOklzc3VlQ29tbWVudDM4MDIzOTkzOA== dnowacki-usgs 13837821 2018-04-10T20:42:34Z 2018-04-10T20:42:34Z CONTRIBUTOR

I only have a vague grasp of proper object oriented programming practices; not sure if the helper functions should be within the class or what, but it does seem to work this way.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement setncattr_string for attributes that are lists of strings 312693611
380156622 https://github.com/pydata/xarray/pull/2045#issuecomment-380156622 https://api.github.com/repos/pydata/xarray/issues/2045 MDEyOklzc3VlQ29tbWVudDM4MDE1NjYyMg== dnowacki-usgs 13837821 2018-04-10T16:05:48Z 2018-04-10T16:05:48Z CONTRIBUTOR

OK, after some false starts, I think this is working, but the CI build is failing on CONDA_ENV=py35 and py36... but it's failing on a different test (specific to netcdf3, complaining about a temp file) and I can't see how it is impacted by my changes... thoughts?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement setncattr_string for attributes that are lists of strings 312693611
379898944 https://github.com/pydata/xarray/issues/2044#issuecomment-379898944 https://api.github.com/repos/pydata/xarray/issues/2044 MDEyOklzc3VlQ29tbWVudDM3OTg5ODk0NA== dnowacki-usgs 13837821 2018-04-09T21:25:30Z 2018-04-09T21:25:30Z CONTRIBUTOR

Ah, nice, thanks. Glad to see it will be default behavior in the future. For kicks, I decided to try to implement it on my own. Pretty much stumbling around in the dark here, but I think I got it working. PR forthcoming.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature request: writing xarray list-type attributes to netCDF 312633077
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 16.285ms · About: xarray-datasette