home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 301031693

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
301031693 MDU6SXNzdWUzMDEwMzE2OTM= 1949 Removing dimensions from Dataset objects 17178478 closed 0     9 2018-02-28T13:53:23Z 2019-03-03T19:39:40Z 2019-03-03T19:39:40Z NONE      

python test_dataset = xr.Dataset(dict( empty_array=xr.DataArray([], dims='a'), populated_array=xr.DataArray([1], {'b':['1']}, 'b') ))

I have a dataset that is produced programatically and can at times end up producing an empty DataArray. This isn't an issue, per-se, because I can remove those empty DataArrays later. However, I cannot find any way in which to remove the unused, empty dimension! I've tried deleting, dropping, resetting indeces, etc., and have had no luck in purging this empty dimension. It causes issues down the line as existence of entries in the dimensions list triggers certain events.

Is there a way to remove a dimension (and possibly then all data variables which depend on it)?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1949/reactions",
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 3 rows from issues_id in issues_labels
  • 9 rows from issue in issue_comments
Powered by Datasette · Queries took 1.514ms · About: xarray-datasette