home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where "created_at" is on date 2018-07-28, state = "closed" and user = 2448579 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 1
  • pull 1

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
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
345426020 MDExOlB1bGxSZXF1ZXN0MjA0NTgxMDA1 2325 interp() now accepts date strings as desired co-ordinate locations dcherian 2448579 closed 0     3 2018-07-28T07:14:22Z 2018-07-30T00:33:13Z 2018-07-29T06:09:41Z MEMBER   0 pydata/xarray/pulls/2325
  • [x] Closes #2284
  • [x] Tests added (for all bug fixes or enhancements)
  • [x] Tests passed (for all non-documentation changes)
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)

```python da = xr.DataArray([1, 5], dims=['time'], coords={'time': [np.datetime64('2014-05-06'), np.datetime64('2014-05-10')]})

da.interp(time='2014-05-07') <xarray.DataArray ()> array(2.) Coordinates: time datetime64[ns] 2014-05-07 ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2325/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
345478817 MDU6SXNzdWUzNDU0Nzg4MTc= 2327 dimensions of interpolated output at single location depends on whether a scalar or list is provided dcherian 2448579 closed 0     2 2018-07-28T21:03:46Z 2018-07-28T22:48:28Z 2018-07-28T22:48:28Z MEMBER      

See below, in the first the output has no dimension but has a co-ordinate.

Code Sample, a copy-pastable example if possible

python da = xr.DataArray([1, 2, 3], dims='a', coords={'a': [1, 2, 3]}) da.interp(a=1.5) <xarray.DataArray ()> array(1.5) Coordinates: a float64 1.5

while python da.interp(a=[1.5]) ``` <xarray.DataArray (a: 1)> array([1.5]) Coordinates: * a (a) float64 1.5 ````

I think the latter should be the answer always. It's surprising to lose a dimension on interpolating...

The fix should occur here, I think: https://github.com/pydata/xarray/blob/f281945fcacbfc1dbaa48fb15546fae5317bdda8/xarray/core/dataset.py#L1330

Changing that to np.atleast_1d breaks tests though :/ @fujiisoup

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

Advanced export

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

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 449.926ms · About: xarray-datasette