home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

3 rows where repo = 13221727, state = "closed" and user = 37740986 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

  • pull 2
  • issue 1

state 1

  • closed · 3 ✖

repo 1

  • xarray · 3 ✖
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
908651787 MDExOlB1bGxSZXF1ZXN0NjU5MzEyMjIx 5425 Error concat dataset and dataarray thomashirtz 37740986 closed 0     13 2021-06-01T20:12:24Z 2021-06-08T16:00:53Z 2021-06-04T22:05:30Z CONTRIBUTOR   0 pydata/xarray/pulls/5425

I inadvertently closed the first PR

Pull related to the issue 5051

  • [x] Closes #5051
  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5425/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
834509559 MDU6SXNzdWU4MzQ1MDk1NTk= 5051 Error message when trying to concatenate DataSet and DataArray thomashirtz 37740986 closed 0     4 2021-03-18T08:07:18Z 2021-06-04T22:05:29Z 2021-06-04T22:05:29Z CONTRIBUTOR      

I come from the conversation 5047. There is a misleading error when trying to concatenate a DataArray and a DataSet:

What you expected to happen: Have an error that give you a hint about the wrong type

Minimal Complete Verifiable Example:

```python import numpy as np import xarray as xr

dataset = xr.Dataset( {"measurements": (("simulation", "characteristic", "value"), np.random.random((10,3,6)))}, coords={"characteristic": ['a', 'b', 'c']})

logged = np.log(dataset["measurements"].sel(characteristic=["b", "c"])) logged = logged.assign_coords(characteristic=["log_b", "log_c"])

xr.concat([dataset, logged], dim="characteristic")


ValueError Traceback (most recent call last) <ipython-input-10-8df5bd650bd4> in <module> 10 logged = logged.assign_coords(characteristic=["log_b", "log_c"]) 11 ---> 12 xr.concat([dataset, logged], dim="characteristic")

C:\ProgramData\Anaconda3\lib\site-packages\xarray\core\concat.py in concat(objs, dim, data_vars, coords, compat, positions, fill_value, join, combine_attrs) 237 "objects, got %s" % type(first_obj) 238 ) --> 239 return f( 240 objs, dim, data_vars, coords, compat, positions, fill_value, join, combine_attrs 241 )

C:\ProgramData\Anaconda3\lib\site-packages\xarray\core\concat.py in _dataset_concat(datasets, dim, data_vars, coords, compat, positions, fill_value, join, combine_attrs) 433 ) 434 --> 435 dim_coords, dims_sizes, coord_names, data_names = _parse_datasets(datasets) 436 dim_names = set(dim_coords) 437 unlabeled_dims = dim_names - coord_names

C:\ProgramData\Anaconda3\lib\site-packages\xarray\core\concat.py in _parse_datasets(datasets) 394 395 for ds in datasets: --> 396 dims_sizes.update(ds.dims) 397 all_coord_names.update(ds.coords) 398 data_vars.update(ds.data_vars)

ValueError: dictionary update sequence element #0 has length 10; 2 is required ```

Anything else we need to know?: For the previous code to be working, it is needed to write dataset[["measurements"]]

Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.8.8 (default, Feb 24 2021, 15:54:32) [MSC v.1928 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD byteorder: little LC_ALL: None LANG: None LOCALE: fr_FR.cp1252 libhdf5: 1.10.4 libnetcdf: None xarray: 0.17.0 pandas: 1.2.3 numpy: 1.19.2 scipy: 1.6.1 netCDF4: None pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2021.02.0 distributed: 2021.03.0 matplotlib: 3.3.4 cartopy: None seaborn: 0.11.1 numbagg: None pint: None setuptools: 52.0.0.post20210125 pip: 21.0.1 conda: 4.9.2 pytest: 6.2.2 IPython: 7.21.0 sphinx: 3.5.1
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5051/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
905848466 MDExOlB1bGxSZXF1ZXN0NjU2ODk3OTI0 5397 Add type checking when concat thomashirtz 37740986 closed 0     5 2021-05-28T18:19:20Z 2021-06-01T20:06:32Z 2021-06-01T20:06:32Z CONTRIBUTOR   0 pydata/xarray/pulls/5397

Pull related to the issue 5051 (I was not so sure about the Error message, please check if it is acceptable)

  • [ ] Closes #5051
  • [ ] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5397/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

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 73.661ms · About: xarray-datasette