home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where user = 8441217 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 4

  • `axis` keyword ignored when applying `np.squeeze` to `DataArray` 1
  • passing unlimited_dims to to_netcdf triggers RuntimeError: NetCDF: Invalid argument 1
  • `axis` keyword ignored when applying `np.squeeze` to `DataArray` (#1487) 1
  • concat_dim getting added to *all* variables of multifile datasets 1

user 1

  • floriankrb · 4 ✖

author_association 1

  • CONTRIBUTOR 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
452337937 https://github.com/pydata/xarray/issues/2064#issuecomment-452337937 https://api.github.com/repos/pydata/xarray/issues/2064 MDEyOklzc3VlQ29tbWVudDQ1MjMzNzkzNw== floriankrb 8441217 2019-01-08T15:25:27Z 2019-01-08T15:25:27Z CONTRIBUTOR

The comment from henrica above gives a solution to @xylar 's issue. Here is the original example where I added : data_vars='minimal'.

```python

!/usr/bin/env python3

import xarray ds = xarray.open_mfdataset('example_jan.nc', concat_dim='Time', data_vars='minimal') print(ds) ```

Dimensions: (Time: 1, nOceanRegions: 7, nOceanRegionsTmp: 7, nVertLevels: 100) Dimensions without coordinates: Time, nOceanRegions, nOceanRegionsTmp, nVertLevels Data variables: refBottomDepth (nVertLevels) float64 dask.array<shape=(100,), chunksize=(100,)> time_avg_avgValueWithinOceanLayerRegion_avgLayerTemperature (Time, nOceanRegionsTmp, nVertLevels) float64 dask.array<shape=(1, 7, 100), chunksize=(1, 7, 100)> time_avg_avgValueWithinOceanRegion_avgSurfaceTemperature (Time, nOceanRegions) float64 dask.array<shape=(1, 7), chunksize=(1, 7)> time_avg_daysSinceStartOfSim (Time) timedelta64[ns] dask.array<shape=(1,), chunksize=(1,)> xtime_end (Time) |S64 dask.array<shape=(1,), chunksize=(1,)> xtime_start (Time) |S64 dask.array<shape=(1,), chunksize=(1,)> Attributes: history: Tue Dec 6 04:49:14 2016: ncatted -O -a ,global,d,, acme_alaph7... NCO: "4.6.2"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  concat_dim getting added to *all* variables of multifile datasets 314764258
369543072 https://github.com/pydata/xarray/issues/1849#issuecomment-369543072 https://api.github.com/repos/pydata/xarray/issues/1849 MDEyOklzc3VlQ29tbWVudDM2OTU0MzA3Mg== floriankrb 8441217 2018-03-01T10:09:40Z 2018-03-01T10:09:40Z CONTRIBUTOR

I also ran into this issue : to_netcdf fails for my dataset.

Here is how to reproduce the error : (the testfile is attached here 1.zip )

import netCDF4 import xarray as xr print(netCDF4.__version__) print(xr.__version__) ds = xr.open_dataset('testfile') ds.to_netcdf('outfile.ok') ds.to_netcdf('outfile.not.ok', unlimited_dims=['datetime'])

And the ouput I get :

1.3.1 0.10.1 Traceback (most recent call last): File "bug.py", line 6, in <module> ds.to_netcdf('outfile', unlimited_dims=['datetime']) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/core/dataset.py", line 1133, in to_netcdf unlimited_dims=unlimited_dims) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/backends/api.py", line 632, in to_netcdf unlimited_dims=unlimited_dims) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/core/dataset.py", line 1070, in dump_to_store unlimited_dims=unlimited_dims) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/backends/common.py", line 280, in store unlimited_dims=unlimited_dims) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/backends/netCDF4_.py", line 348, in set_variables super(NetCDF4DataStore, self).set_variables(args, *kwargs) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/backends/common.py", line 317, in set_variables name, v, check, unlimited_dims=unlimited_dims) File "/home/pinaultf/miniconda3/envs/defaultenv/lib/python3.6/site-packages/xarray/backends/netCDF4_.py", line 393, in prepare_variable fill_value=fill_value) File "netCDF4/_netCDF4.pyx", line 2437, in netCDF4._netCDF4.Dataset.createVariable File "netCDF4/_netCDF4.pyx", line 3439, in netCDF4._netCDF4.Variable.init File "netCDF4/_netCDF4.pyx", line 1638, in netCDF4._netCDF4._ensure_nc_success RuntimeError: NetCDF: Invalid argument

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  passing unlimited_dims to to_netcdf triggers RuntimeError: NetCDF: Invalid argument 290572700
366658572 https://github.com/pydata/xarray/pull/1918#issuecomment-366658572 https://api.github.com/repos/pydata/xarray/issues/1918 MDEyOklzc3VlQ29tbWVudDM2NjY1ODU3Mg== floriankrb 8441217 2018-02-19T11:11:55Z 2018-02-19T11:11:55Z CONTRIBUTOR

Here it is. Thanks for your code reviews and your helpful comments !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `axis` keyword ignored when applying `np.squeeze` to `DataArray` (#1487) 297793359
366242783 https://github.com/pydata/xarray/issues/1487#issuecomment-366242783 https://api.github.com/repos/pydata/xarray/issues/1487 MDEyOklzc3VlQ29tbWVudDM2NjI0Mjc4Mw== floriankrb 8441217 2018-02-16T14:01:20Z 2018-02-16T14:01:20Z CONTRIBUTOR

Yes, @shoyer is right : Looking at the numpy code, this array.squeeze(axis) -> array.squeeze() is happening. 1256 try: 1257 # First try to use the new axis= parameter 1258 return squeeze(axis=axis) 1259 except TypeError: 1260 # For backwards compatibility 1261 return squeeze()

I added the axis parameter in xarray and this fixed the problem.

``` PYTHONPATH=$HOME/sandbox/dev/xarray python -c 'import numpy as np ; import xarray as xr ; test = np.random.random((1,10,1)) ; print(np.squeeze(test, axis=0).shape); print(np.squeeze(xr.DataArray(test), axis=0).shape, np.version, xr.version) ' (10, 1) (10, 1) 1.13.1 0.10.0+dev64.gd554ece

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `axis` keyword ignored when applying `np.squeeze` to `DataArray` 245468219

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