home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 298834332

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
298834332 MDU6SXNzdWUyOTg4MzQzMzI= 1931 apply_ufunc produces illegal coordinate sizes 25473287 closed 0     5 2018-02-21T03:58:19Z 2018-05-31T15:40:04Z 2018-05-31T15:40:04Z NONE      

If func changes the size of the core dimension, apply_ufunc(func, ..) will only change the data variable dimension but keep the coordinate dimension and value unchanged. The resulting DataArray cannot be saved to a NetCDF file due to dimension inconsistency. Please see this GitHub gist for a simple illustration.

Would it be more natural to drop the core coordinate by default? This is safer (will not produce illegal NetCDF file) and also makes more physical sense (the core coordinate is likely to change).

I'd like use apply_ufunc to track metadata in my xESMF package, but the output DataArray will have incorrect lon and lat coordinate dimension and values. It is easy to manually correct this afterwards but I want to bring up this issue.

Output of xr.show_versions()

commit: None python: 3.6.2.final.0 python-bits: 64 OS: Darwin OS-release: 16.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.0 pandas: 0.22.0 numpy: 1.13.3 scipy: 1.0.0 netCDF4: 1.3.1 h5netcdf: 0.5.0 Nio: None bottleneck: 1.2.1 cyordereddict: None dask: 0.17.0 matplotlib: 2.0.2 cartopy: 0.15.1 seaborn: 0.8.0 setuptools: 38.2.5 pip: 9.0.1 conda: None pytest: 3.2.5 IPython: 6.1.0 sphinx: 1.6.5
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1931/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.914ms · About: xarray-datasette