home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

12 rows where user = 358378 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 10
  • pull 2

state 1

  • closed 12

repo 1

  • xarray 12
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
474463902 MDU6SXNzdWU0NzQ0NjM5MDI= 3169 Plotting inconsistencies with Cartopy andreas-h 358378 closed 0     4 2019-07-30T09:06:15Z 2022-04-18T15:49:12Z 2022-04-18T15:49:12Z CONTRIBUTOR      

I'm on xarray 0.11.3, and currently do not have the possibility to test on master. However, the commit history suggests that this issue still exists. Please accept my apologies if I missed something.

I'm following the plotting documentation at https://xarray.pydata.org/en/stable/plotting.html#maps

When plotting two maps in the same call (exactly as written in the documentation),

p = air.isel(time=[0, 1]).plot(transform=ccrs.PlateCarree(), col='time',
                               subplot_kws={'projection': ccrs.Orthographic(-80, 35)})

for ax in p.axes.flat:
    ax.coastlines()
    ax.gridlines()

everything works fine.

However, when I only want to plot one map,

p = air.isel(time=[0]).plot(transform=ccrs.PlateCarree(),
                            subplot_kws={'projection': ccrs.Orthographic(-80, 35)})

for ax in p.axes.flat:
    ax.coastlines()
    ax.gridlines()

I get the following error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-63-2c5a2a533878> in <module>
      1 p = air.isel(time=[0]).plot(transform=ccrs.PlateCarree(),
----> 2                             subplot_kws={'projection': ccrs.Orthographic(-80, 35)})
      3 
      4 for ax in p.axes.flat:
      5     ax.coastlines()

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in __call__(self, **kwargs)
    550 
    551     def __call__(self, **kwargs):
--> 552         return plot(self._da, **kwargs)
    553 
    554     @functools.wraps(hist)

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in plot(darray, row, col, col_wrap, ax, hue, rtol, subplot_kws, **kwargs)
    185     kwargs['ax'] = ax
    186 
--> 187     return plotfunc(darray, **kwargs)
    188 
    189

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in newplotfunc(darray, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, center, robust, extend, levels, infer_intervals, colors, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, **kwargs)
    852                              vmax=cmap_params['vmax'],
    853                              norm=cmap_params['norm'],
--> 854                              **kwargs)
    855 
    856         # Label the plot with metadata

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/xarray/plot/plot.py in pcolormesh(x, y, z, ax, infer_intervals, **kwargs)
   1106             y = _infer_interval_breaks(y, axis=0)
   1107 
-> 1108     primitive = ax.pcolormesh(x, y, z, **kwargs)
   1109 
   1110     # by default, pcolormesh picks "round" values for bounds

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)
   1808                         "the Matplotlib list!)" % (label_namer, func.__name__),
   1809                         RuntimeWarning, stacklevel=2)
-> 1810             return func(ax, *args, **kwargs)
   1811 
   1812         inner.__doc__ = _add_data_doc(inner.__doc__,

/home/jupyterhub/conda/envs/prod/lib/python3.6/site-packages/matplotlib/axes/_axes.py in pcolormesh(self, alpha, norm, cmap, vmin, vmax, shading, antialiased, *args, **kwargs)
   6011         if (not isinstance(t, mtransforms.Transform) and
   6012             hasattr(t, '_as_mpl_transform')):
-> 6013             t = t._as_mpl_transform(self.axes)
   6014 
   6015         if t and any(t.contains_branch_seperately(self.transData)):

lib/cartopy/_crs.pyx in cartopy._crs.CRS._as_mpl_transform()

ValueError: Axes should be an instance of GeoAxes, got <class 'matplotlib.axes._subplots.AxesSubplot'>

It is not clear (from the user perspective) why one should work and the other should not.

Of course I can create the axes instance before using xarray's plot function, but it would be nicer if I wouldn't have to.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3169/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
219321876 MDU6SXNzdWUyMTkzMjE4NzY= 1352 Saving to netCDF with 0D dimension doesn't work andreas-h 358378 closed 0     9 2017-04-04T17:16:40Z 2021-07-17T18:38:29Z 2021-07-17T18:38:15Z CONTRIBUTOR      

I'm using xarray 0.9.1.

When I have an array

<xarray.Dataset>
Dimensions:       (category: 1, lat: 672, lon: 720, species: 1)
Coordinates:
  * lat           (lat) float64 30.03 30.09 30.16 30.22 30.28 30.34 30.41 ...
  * category      (category) <U3 'agr'
  * species       (species) <U4 'PM10'
  * lon           (lon) float64 -29.94 -29.81 -29.69 -29.56 -29.44 -29.31 ...
Data variables:
    TNO-MACC3_EU  (lon, lat) float64 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ...

and try to write to netCDF using .to_netcdf(), I get an

IndexError: tuple index out of range

I can fix this by manually doing

d_['species'] = np.atleast_1d(d_['species'])
d_['category'] = np.atleast_1d(d_['category'])

before calling .to_netcdf().

I believe it would be good if xarray would do this check on its own and apply the coorection on-the-fly to allow saving to netCDF in this case as well.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1352/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
48301141 MDU6SXNzdWU0ODMwMTE0MQ== 277 Creation of an empty DataArray andreas-h 358378 closed 0   0.5 987654 11 2014-11-10T19:07:55Z 2020-03-06T12:38:08Z 2020-03-06T12:38:07Z CONTRIBUTOR      

I'd like to create an empty DataArray, i.e., one with only NA values. The docstring of DataArray says that data=None is allowed, if a dataset argument is provided. However, the docstring doesn't say anything about a dataset argument. 1. I think there's a bug in the docstring 2. I'd like to pass data=None and get a DataArray with the coords/dims set up properly (as defined by the coords and dims kwargs), but with a values array of NA.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/277/reactions",
    "total_count": 10,
    "+1": 10,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
46756098 MDU6SXNzdWU0Njc1NjA5OA== 266 Easy iteration over slices of a DataArray andreas-h 358378 closed 0   1.0 741199 2 2014-10-24T16:20:51Z 2019-01-15T20:09:35Z 2019-01-15T20:09:34Z CONTRIBUTOR      

The DataArray object would benefit from functionality similar to iris.cube.Cube.slices. Given an array

```

Out23: Coordinates: * sza (sza) float64 0.0 36.87 53.13 60.0 72.54 75.52 81.37 87.13 88.28 * vza (vza) float64 0.0 72.54 * raa (raa) float64 0.0 60.0 90.0 120.0 180.0 * wl (wl) float64 360.0 380.0 400.0 420.0 440.0 ```

it would be nice to be able to do

for sl in data.slices(["raa", "wl"]): # do magic with a DataArray of coordinates (sza, vza)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/266/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
213082731 MDU6SXNzdWUyMTMwODI3MzE= 1304 Create `xarray.Dataset` from a `netCDF4.Dataset` object andreas-h 358378 closed 0     5 2017-03-09T16:03:16Z 2017-11-29T16:02:03Z 2017-11-29T16:02:03Z CONTRIBUTOR      

For some applications, it would be nice if it were possible to create an xarray.Dataset from a netCDF4.Dataset, so that the following code would work:

with Dataset(filename) as nc:
    ds = xr.open_dataset(nc)
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1304/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
168848449 MDU6SXNzdWUxNjg4NDg0NDk= 931 How to cite xarray in a research paper andreas-h 358378 closed 0 jhamman 2443309 1.0 741199 4 2016-08-02T10:13:09Z 2016-08-04T21:17:53Z 2016-08-04T21:17:53Z CONTRIBUTOR      

It would be helpful if the documentation had an entry (for example, in the FAQ) about how to properly cite xarray for a scientific publication. I personally like the way e.g. the ipython folks are doing it, they have bibtex code to copy'n'paste (see https://ipython.org/citing.html).

This issue is related to #290, but addresses the general problem and not a specific way.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/931/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
101857508 MDU6SXNzdWUxMDE4NTc1MDg= 540 allow custom 'units' when saving datetimes to netCDF andreas-h 358378 closed 0     2 2015-08-19T10:24:22Z 2016-04-08T18:48:31Z 2016-04-08T18:48:31Z CONTRIBUTOR      

when manually setting the units attribute of a DataArray containing datetime types, the error

ValueError: Failed hard to prevent overwriting key 'units'

is raised.

It would be good to allow custom units, because currently the units seem to be days since FIRST_TIMESTEP, which leads to different units for different variables within the same Dataset.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/540/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
126382000 MDExOlB1bGxSZXF1ZXN0NTU4NzU0NDk= 718 Update index.rst andreas-h 358378 closed 0     1 2016-01-13T09:57:40Z 2016-01-13T16:37:56Z 2016-01-13T16:37:56Z CONTRIBUTOR   0 pydata/xarray/pulls/718

fix link to mailing list

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/718/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
97237275 MDExOlB1bGxSZXF1ZXN0NDA4MzkzNjU= 495 ENH: finite difference method `diff` andreas-h 358378 closed 0     12 2015-07-25T16:33:20Z 2015-08-21T18:13:00Z 2015-08-21T18:12:57Z CONTRIBUTOR   0 pydata/xarray/pulls/495

adds diff method to both DataArray and Dataset. closes #490

Still to be done: - tests

Possible enhancements: - allow numeric axis instead of dim for DataArray objects. The signature would then be DataArray.diff(dim=None, n=1, axis=None) and I would need to check that exactly one of dim and axis is None. I find it a bit ugly; DataArray.diff(n=1, dim=None, axis=None) would be nicer in my view. But then the signatures for DataArray.diff and Dataset.diff would be different, which is also not nice. - allow specifying the new coordinate array explicitly via a coord kwarg instead of just taking the coordinate values of the upper bounds.

What do you think?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/495/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
96844263 MDU6SXNzdWU5Njg0NDI2Mw== 490 add diff method to DataArray class andreas-h 358378 closed 0     2 2015-07-23T15:46:03Z 2015-08-21T18:12:57Z 2015-08-21T18:12:57Z CONTRIBUTOR      

I think it would be useful if the DataArray class had a diff method, equivalent to the pandas.DataFrame.diff method.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/490/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
101858170 MDU6SXNzdWUxMDE4NTgxNzA= 541 writing DataArray with 2D datetime variable doesn't work andreas-h 358378 closed 0     1 2015-08-19T10:28:32Z 2015-08-19T16:20:37Z 2015-08-19T16:20:37Z CONTRIBUTOR      

On xray 0.5.1, writing a Dataset with a non-1D-datetime variable to netCDF doesn't work:

``` times = xray.DataArray([[datetime.datetime.now()] * 2]) print times <xray.DataArray (dim_0: 1, dim_1: 2)> array([['2015-08-19T14:27:50.911502000+0200', '2015-08-19T14:27:50.911502000+0200']], dtype='datetime64[ns]') Coordinates: * dim_0 (dim_0) int64 0 * dim_1 (dim_1) int64 0 1

times.to_dataset().to_netcdf('test.nc') ```

raises

TypeError: Cannot convert input to Timestamp

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/541/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
46750605 MDU6SXNzdWU0Njc1MDYwNQ== 265 DataArray computations should handle missing values correctly andreas-h 358378 closed 0     3 2014-10-24T15:28:25Z 2015-03-03T07:38:29Z 2014-10-24T16:17:26Z CONTRIBUTOR      

Maybe I'm just missing something ... but shouldn't

xray.DataArray(np.asarray([1., np.nan]), coords=[[1, 2]], dims=["X"]).mean()

return 1 instead of nan? Or how is calculations with missing values supposed to work?

I'm running xray 0.3.0.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/265/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 21.658ms · About: xarray-datasette