home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

1 row where user = 56707780 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 1

  • issue 1

state 1

  • closed 1

repo 1

  • xarray 1
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
509285415 MDU6SXNzdWU1MDkyODU0MTU= 3416 Cannot write array larger than 4GB with SciPy netCDF backend angelolab 56707780 closed 0     6 2019-10-18T20:06:29Z 2019-10-21T08:53:25Z 2019-10-21T08:53:25Z NONE      

MCVE Code Sample

```python

Your code here

import numpy as np import xarray as xr

random_vals = np.random.randint(0, 10, 18010241024*5) test_array = random_vals.reshape((180, 1024, 1024, 5)) test_xr = xr.DataArray(test_array, coords=[range(test_array.shape[0]), range(test_array.shape[1]), range(test_array.shape[2]), range(test_array.shape[3])], dims=["Image", "Rows", "Cols", "Channels"])

test_xr.to_netcdf("test_xr.nc", format="NETCDF3_64BIT")

```

Expected Output

This should either give an error that the requested array is too big to save, or should successfully save it.

Problem Description

However, what instead happens is a long a stack trace that gives an OS error , which is confusing to debug. Reducing the dimensionality of the above data by a factor of 10 removes this error, demonstrating that it is a size issue.

Traceback (most recent call last): File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-27-6ad9f8a3fa66>", line 1, in <module> test_xr.to_netcdf("test_xr.nc", format="NETCDF3_64BIT") File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/xarray/core/dataarray.py", line 1791, in to_netcdf return dataset.to_netcdf(args, *kwargs) File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/xarray/core/dataset.py", line 1323, in to_netcdf compute=compute) File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/xarray/backends/api.py", line 822, in to_netcdf store.close() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/xarray/backends/scipy_.py", line 226, in close self._manager.close() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 188, in close file.close() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/scipy/io/netcdf.py", line 299, in close self.flush() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/scipy/io/netcdf.py", line 409, in flush self._write() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/scipy/io/netcdf.py", line 421, in _write self._write_var_array() File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/scipy/io/netcdf.py", line 477, in _write_var_array self._write_var_data(name) File "/Users/noahgreenwald/Documents/Grad_School/Lab/Segmentation_Project/code/segmentation/env/lib/python3.6/site-packages/scipy/io/netcdf.py", line 525, in _write_var_data self.fp.write(var.data.tostring()) OSError: [Errno 22] Invalid argument

Output of xr.show_versions()

# Paste the output here xr.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] python-bits: 64 OS: Darwin OS-release: 18.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: None LOCALE: en_US.UTF-8 libhdf5: None libnetcdf: None xarray: 0.12.1 pandas: 0.24.2 numpy: 1.16.3 scipy: 1.2.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudonetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 2.2.2 cartopy: None seaborn: None setuptools: 39.0.1 pip: 9.0.3 conda: None pytest: None IPython: 7.8.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3416/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 43.35ms · About: xarray-datasette