issues
7 rows where state = "closed" and user = 23484003 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: comments, created_at (date), updated_at (date), closed_at (date)
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1335419018 | I_kwDOAMm_X85PmOCK | 6907 | Subplots w/ xarrays | lamorton 23484003 | closed | 0 | 2 | 2022-08-11T03:16:43Z | 2022-08-11T16:21:30Z | 2022-08-11T16:21:30Z | NONE | What is your issue?I tried to add an ``` import numpy as np import xarray as xr x1 = np.linspace(0,1,10) y1 = x1**2 da1 = xr.DataArray(y1,dims=("x"),coords={"x":x1}) x2 = np.linspace(0,1,10,endpoint=True) y2 = np.sqrt(x2) da2 = xr.DataArray(y2,dims=("x"),coords={"x":x2}) fg,(ax1,ax2) = plt.subplots(nrows=2,ncols=1)#,sharex=True)
da1.plot(axes=ax1)
da2.plot(axes=ax2)
File "/var/folders/g6/42nl1yms1yq8tbmt3kpgm5b80000gp/T/ipykernel_2783/171456975.py", line 2, in <cell line: 2> da.plot(axes=ax1) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/xarray/plot/plot.py", line 866, in call return plot(self._da, **kwargs) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/xarray/plot/plot.py", line 332, in plot return plotfunc(darray, **kwargs) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/xarray/plot/plot.py", line 440, in line primitive = ax.plot(xplt_val, yplt_val, args, *kwargs) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 1634, in plot self.add_line(line) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 2279, in add_line self._set_artist_props(line) File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/matplotlib/axes/_base.py", line 1105, in _set_artist_props a.axes = self File "/Users/lucas.morton/opt/anaconda3/envs/work/lib/python3.9/site-packages/matplotlib/artist.py", line 275, in axes raise ValueError("Can not reset the axes. You are probably " ValueError: Can not reset the axes. You are probably trying to re-use an artist in more than one Axes which is not supported ``` I was hoping to get to the point where I could use the If I do this, I can make the figure, but I don't get the Interestingly, I can get the same error message if I change the order of operations here: ``` fg = plt.figure() ax1 = fg.add_subplot(211) ax2 = fg.add_subplot(212) da1.plot(axes=ax1) da2.plot(axes=ax2) ``` Any idea what might be going on here? |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6907/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
675288247 | MDU6SXNzdWU2NzUyODgyNDc= | 4322 | "_center" postfix on axis label resulting from groupby_bins persists after renaming variable | lamorton 23484003 | closed | 0 | 5 | 2020-08-07T21:01:19Z | 2021-01-12T16:44:49Z | 2021-01-12T16:44:49Z | NONE | What happened: I used groupby_bins + sum to reduce the resolution of my dataset along 'x' dimension. I didn't like the 'x_bins_center' label, so I renamed the x-axis dim/coord to simply 'x.' However, the "_center" postfix is not part of the variable name -- it appears to be some tweaking of the x-axis label when plotting. So now I am stuck with "_center" tagged at the end of the x-axis label, even after the units. What you expected to happen: It would make more sense if the '_center' were part of the variable name. That way, the name displayed on the plot is the same one that I need to access the variable in the dataset. Also, when I rename the variable, I will be able to change the way it displays. Furthermore, that will prevent the issue with "_center" getting pasted on after the units. Minimal Complete Verifiable Example: ```python import xarray as xr import numpy as np data_vars={'y':('x',np.ones((101)),{'units':'kg/m'})} coords={'x':('x',np.linspace(0,1,101,endpoint=True),{'units':'m'})} ds = xr.Dataset(data_vars,coords) dsd = ds.groupby_bins('x',np.linspace(0,1,11,endpoint=True),right=False).sum(dim='x') dsd.y.plot() #Shows that the x-axis is named "x_bins_center" dsd = dsd.rename({'x_bins_center':'x'}) #Fails:
``` Anything else we need to know?: PlotsHere's the 1st plot showing the default x-axis label prior to renaming:  Here's the 2nd plot showing the mangled x-axis label after I renamed the variable & reestablished the units: Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.7.7 (default, Mar 23 2020, 17:31:31) [Clang 4.0.1 (tags/RELEASE_401/final)] python-bits: 64 OS: Darwin OS-release: 19.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.1 xarray: 0.16.0 pandas: 1.0.3 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.4.2 pydap: None h5netcdf: 0.8.0 h5py: 2.10.0 Nio: None zarr: None cftime: 1.2.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.20.0 distributed: None matplotlib: 3.1.3 cartopy: None seaborn: None numbagg: None pint: 0.11 setuptools: 49.2.0.post20200714 pip: 20.1.1 conda: None pytest: 5.4.1 IPython: 7.13.0 sphinx: 3.1.2 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4322/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
664067837 | MDU6SXNzdWU2NjQwNjc4Mzc= | 4255 | line labels for 1D plotting | lamorton 23484003 | closed | 0 | 2 | 2020-07-22T21:41:52Z | 2020-07-22T21:47:42Z | 2020-07-22T21:47:42Z | NONE | Is your feature request related to a problem? Please describe.
I find myself wanting to compare multiple 1D line plots.
Describe the solution you'd like
Basically, I'd just like to have these two lines added to the body of
This would automatically add the title as a label. This would not change the way the plot looks in the original case, and if the caller of Describe alternatives you've considered
Another alternative is to make a switch in |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4255/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
224878728 | MDU6SXNzdWUyMjQ4Nzg3Mjg= | 1388 | argmin / argmax behavior doesn't match documentation | lamorton 23484003 | closed | 0 | 11 | 2017-04-27T18:50:36Z | 2020-07-09T21:32:52Z | 2020-07-09T21:32:52Z | NONE | The documentation reads
However, what happens is that the numpy argmin output (single index into the flattened array at which the maximum/minimum is found) is wrapped in a dummy DataArray (similar behavior for Datasets also):
I realize that maybe for compatibility reasons it is necessary to make Datasets/DataArrays do this, but it seems like the documented behavior would be nicer. At any rate, the documentation should match the behavior. Specs: python 2.7 xarray 0.9.1 numpy 1.11.3 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1388/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
604210297 | MDU6SXNzdWU2MDQyMTAyOTc= | 3991 | Nondeterministic bug with bytestring decoding | lamorton 23484003 | closed | 0 | 2 | 2020-04-21T18:57:28Z | 2020-04-21T20:39:56Z | 2020-04-21T20:39:56Z | NONE | I have an HDF5 dataset with a scalar variable called 'name' that is actual a 0-D NumPy array with dtype '|S8'. (Not my choice, this is what I get from someone else...) Occasionally, the loading fails. MCVE Code Sample```python Set up the fileimport h5py f = h5py.File("error_demo.h5",mode='w') f.create_dataset('name',shape=(),dtype="|S8",data=np.array([b'f(Pt,TE)'],dtype='|S8')) f.close() Produce the error -- you may need to adjust the number of times you run the loopimport xarray as xr for i in range(10): xr.load_dataset("error_demo.h5") ``` Expected Output<xarray.Dataset> Dimensions: () Data variables: name <U8 'f(Pt,TE)' Problem DescriptionThe resulting error message``` Traceback (most recent call last): File "<ipython-input-3-b8e48f28a262>", line 1, in <module> mcout62 = xr.load_dataset("57062/mcout000011.h5",group=r"part/ions/dE(r,z,D)") File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/backends/api.py", line 261, in load_dataset return ds.load() File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/dataset.py", line 659, in load v.load() File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/variable.py", line 375, in load self._data = np.asarray(self._data) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/numpy/core/_asarray.py", line 85, in asarray return array(a, dtype, copy=False, order=order) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexing.py", line 677, in array self._ensure_cached() File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexing.py", line 674, in _ensure_cached self.array = NumpyIndexingAdapter(np.asarray(self.array)) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/numpy/core/_asarray.py", line 85, in asarray return array(a, dtype, copy=False, order=order) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexing.py", line 653, in array return np.asarray(self.array, dtype=dtype) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/numpy/core/_asarray.py", line 85, in asarray return array(a, dtype, copy=False, order=order) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexing.py", line 557, in array return np.asarray(array[self.key], dtype=None) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 73, in getitem key, self.shape, indexing.IndexingSupport.OUTER, self._getitem File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexing.py", line 837, in explicit_indexing_adapter result = raw_indexing_method(raw_key.tuple) File "/Users/lmorton/opt/anaconda3/lib/python3.7/site-packages/xarray/backends/netCDF4_.py", line 85, in _getitem array = getitem(original_array, key) File "netCDF4/_netCDF4.pyx", line 4408, in netCDF4._netCDF4.Variable.getitem File "netCDF4/_netCDF4.pyx", line 5384, in netCDF4._netCDF4.Variable._get UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc1 in position 9: invalid start byte ``` VersionsOutput of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.7.6 (default, Jan 8 2020, 13:42:34) [Clang 4.0.1 (tags/RELEASE_401/final)] python-bits: 64 OS: Darwin OS-release: 19.4.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.7.3 xarray: 0.15.0 pandas: 1.0.1 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.5.3 pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2.11.0 distributed: 2.11.0 matplotlib: 3.1.3 cartopy: None seaborn: 0.10.0 numbagg: None setuptools: 46.0.0.post20200309 pip: 20.0.2 conda: 4.8.3 pytest: 5.3.5 IPython: 7.12.0 sphinx: 2.4.0 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3991/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
203543958 | MDU6SXNzdWUyMDM1NDM5NTg= | 1233 | 2D coordinates to DataArray: erroneous error message | lamorton 23484003 | closed | 0 | 3 | 2017-01-27T02:20:22Z | 2019-02-23T08:47:00Z | 2019-02-23T08:47:00Z | NONE | I've got a dataset where one of the coordinates is time, and the other is space, but the spatial coordinate is time-dependent (ie, probe is moving), so I need a different set of x-values at each time point. If I run:
ValueError: dimensions ('x',) must have the same length as the number of data dimensions, ndim=2 ``` It looks like the error-check is not functioning correctly, because 'x' obviously has dimension=2, same as 'data'. It would also be helpful to state both the dimensions that are being compared in the error message, and make it clear which is which. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1233/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
215821510 | MDU6SXNzdWUyMTU4MjE1MTA= | 1315 | Logarithmic colorbar ticks are jumbled | lamorton 23484003 | closed | 0 | 1 | 2017-03-21T17:37:45Z | 2017-03-21T17:46:00Z | 2017-03-21T17:44:47Z | NONE | When I use LogNorm to get a logarithmic color scale for an xarray's self-plotting feature, the logarithmic ticks on the colorbar appear to be overplotted with a linear scale. If any of the data is out-of-range (ie, I set vmax & vmin) the problem only gets worse. Here are my specs: Python 2.7.13 |Anaconda custom (64-bit) IPython 5.2.2 -- An enhanced Interactive Python. Using matplotlib backend: TkAgg Numpy: 1.11.3 Matplotlib: 2.0.0 xarray: 0.9.1 The code is: `import numpy from matplotlib.colors import LogNorm import xarray data=numpy.random.random((10,12))*100.0+0.1 xr=xarray.DataArray(data,dims=['t','x']) xr.plot(norm=LogNorm())` This is what it looks like:
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1315/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
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]);