issues
7 rows where user = 3383837 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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2133533727 | I_kwDOAMm_X85_KyQf | 8745 | map_blocks raises AssertionError given chunks along a multiindex | itcarroll 3383837 | open | 0 | 0 | 2024-02-14T04:48:41Z | 2024-02-26T05:59:34Z | CONTRIBUTOR | What happened?To parallelize a computation over a sparse array, I want to create chunks after stacking the array and dropping fill values. Such an array has a multiindex, which breaks the map_blocks method (with an unhelpful error). The AssertionError raised suggests to me that the method does not account for such an array having (coordinate) variables that are not dimensions or a scalar. What did you expect to happen?I expect the MCVE below to return its input unmodified. Minimal Complete Verifiable Example```Python import xarray as xr a = xr.DataArray([[0, 1], [2, 3]], {"x": [0, 1], "y": [0, 1]}) a = a.stack({"n": ("x", "y")}) a = a.chunk({"n": 2}) a.map_blocks(lambda x: x) ``` MVCE confirmation
Relevant log output```Python File ~/tmp/bug/venv/lib/python3.11/site-packages/xarray/core/dataarray.py:5526, in DataArray.map_blocks(self, func, args, kwargs, template) 5428 """ 5429 Apply a function to each block of this DataArray. 5430 (...) 5522 month (time) int64 dask.array<chunksize=(24,), meta=np.ndarray> 5523 """ 5524 from xarray.core.parallel import map_blocks -> 5526 return map_blocks(func, self, args, kwargs, template) File ~/tmp/bug/venv/lib/python3.11/site-packages/xarray/core/parallel.py:539, in map_blocks(func, obj, args, kwargs, template) 535 for chunk_tuple in itertools.product(*ichunk.values()): 536 # mapping from dimension name to chunk index 537 chunk_index = dict(zip(ichunk.keys(), chunk_tuple)) --> 539 blocked_args = [ 540 subset_dataset_to_block(graph, gname, arg, input_chunk_bounds, chunk_index) 541 if isxr 542 else arg 543 for isxr, arg in zip(is_xarray, npargs) 544 ] 546 # raise nice error messages in _wrapper 547 expected: ExpectedDict = { 548 # input chunk 0 along a dimension maps to output chunk 0 along the same dimension 549 # even if length of dimension is changed by the applied function (...) 563 }, 564 } File ~/tmp/bug/venv/lib/python3.11/site-packages/xarray/core/parallel.py:540, in <listcomp>(.0) 535 for chunk_tuple in itertools.product(*ichunk.values()): 536 # mapping from dimension name to chunk index 537 chunk_index = dict(zip(ichunk.keys(), chunk_tuple)) 539 blocked_args = [ --> 540 subset_dataset_to_block(graph, gname, arg, input_chunk_bounds, chunk_index) 541 if isxr 542 else arg 543 for isxr, arg in zip(is_xarray, npargs) 544 ] 546 # raise nice error messages in _wrapper 547 expected: ExpectedDict = { 548 # input chunk 0 along a dimension maps to output chunk 0 along the same dimension 549 # even if length of dimension is changed by the applied function (...) 563 }, 564 } File ~/tmp/bug/venv/lib/python3.11/site-packages/xarray/core/parallel.py:195, in subset_dataset_to_block(graph, gname, dataset, input_chunk_bounds, chunk_index) 190 graph[chunk_variable_task] = ( 191 tuple, 192 [variable.dims, chunk, variable.attrs], 193 ) 194 else: --> 195 assert name in dataset.dims or variable.ndim == 0 197 # non-dask array possibly with dimensions chunked on other variables 198 # index into variable appropriately 199 subsetter = { 200 dim: _get_chunk_slicer(dim, chunk_index, input_chunk_bounds) 201 for dim in variable.dims 202 } AssertionError: ``` Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.11.6 (main, Nov 2 2023, 04:52:24) [Clang 14.0.3 (clang-1403.0.22.14.1)]
python-bits: 64
OS: Darwin
OS-release: 22.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.9.3-development
xarray: 2024.1.1
pandas: 2.2.0
numpy: 1.26.4
scipy: 1.11.4
netCDF4: 1.6.5
pydap: None
h5netcdf: 1.3.0
h5py: 3.10.0
Nio: None
zarr: 2.16.1
cftime: 1.6.3
nc_time_axis: None
iris: None
bottleneck: None
dask: 2024.2.0
distributed: None
matplotlib: 3.8.2
cartopy: 0.22.0
seaborn: None
numbagg: None
fsspec: 2024.2.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 68.2.2
pip: 24.0
conda: None
pytest: None
mypy: None
IPython: 8.18.1
sphinx: None
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8745/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | issue | ||||||||
1521368478 | I_kwDOAMm_X85arj2e | 7423 | unstacking an integer array yields a RuntimeWarning after upgrade to numpy 1.24.1 | itcarroll 3383837 | closed | 0 | 9 | 2023-01-05T20:29:45Z | 2023-12-11T14:27:09Z | 2023-11-06T06:05:16Z | CONTRIBUTOR | What happened?After upgrading numpy from 1.23.5 to 1.24.1, calling the What did you expect to happen?In the case below, where there is no need for a fill value, I do not expect to get a warning. Minimal Complete Verifiable Example```Python import xarray as xr import numpy as np np.seterr(all='raise') # uncomment to convert warning to errorda = xr.DataArray( data=np.array([[0]], dtype=int), coords={'x': [0], 'y': [1]}, ) da = da.stack({'z': ['x', 'y']}) da.unstack() ``` MVCE confirmation
Relevant log output
Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.9 (main, Dec 15 2022, 18:18:30) [Clang 14.0.0 (clang-1400.0.29.202)]
python-bits: 64
OS: Darwin
OS-release: 21.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.9.0
xarray: 2022.12.0
pandas: 1.5.2
numpy: 1.24.1
scipy: 1.10.0
netCDF4: 1.6.2
pydap: None
h5netcdf: 1.1.0
h5py: 3.7.0
Nio: None
zarr: None
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2022.12.1
distributed: None
matplotlib: 3.6.2
cartopy: 0.21.1
seaborn: None
numbagg: None
fsspec: 2022.11.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.6.3
pip: 22.1.2
conda: None
pytest: None
mypy: None
IPython: 8.8.0
sphinx: None
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7423/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
1908161401 | I_kwDOAMm_X85xvDt5 | 8225 | Scalar coordinates should not be footloose | itcarroll 3383837 | closed | 0 | 5 | 2023-09-22T04:28:11Z | 2023-09-25T16:10:40Z | 2023-09-25T16:10:40Z | CONTRIBUTOR | Is your feature request related to a problem?A scalar coordinate has the counter-intuitive property of being able to hop from one data variable to another. ``` import xarray as xr a = xr.Dataset(
data_vars={"a": (("x",), [0, 0])},
coords={
"x": [0.1, 2.3],
"y": 42,
},
)
b = xr.Dataset(
data_vars={"b": ("x", [1, 1])},
coords={
"x": [0.1, 2.3],
},
)
c = xr.merge((a, b))
Describe the solution you'd likeI would like each data variable in a dataset to keep track of its own scalar coordinates (as they can, of course and absolutely essentially, do for dimension coordinates). To continue the example above, I think Describe alternatives you've consideredNo response Additional contextI think this feature could also help with #4501, wherein squeezing demotes a length-one non-dimensional coordinate to a scalar coordinate without tracking its own scalar coordinate. Egads, that's an ugly sentence. I'll elaborate over there. Most importantly, this feature would solve a real problem I've encountered: model outputs, one for each combination of model parameters, that record parameters as a scalar coordinate only on the data variables the parameter affects. If you want to concatenate these together with XArray, you invariably get a lot of unncecessary data duplication. A contrived example with two outputs, in which the "temp" variable depends on parameter "time" but the "pressure" variable does not:
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8225/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
1825198736 | I_kwDOAMm_X85sylKQ | 8026 | non-deterministic ordering within "coordinates" attribute written by .to_netcdf | itcarroll 3383837 | closed | 0 | 2 | 2023-07-27T20:50:20Z | 2023-08-03T16:27:29Z | 2023-08-03T16:27:29Z | CONTRIBUTOR | What is your issue?Under the assumption that deterministic output is preferred whenever feasible, I'd like to point out that the variable names written into "coordinates" attributes with Consider the dataset My review of |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8026/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
1830038411 | PR_kwDOAMm_X85W2FcN | 8034 | sort when encoding coordinates for deterministic outputs | itcarroll 3383837 | closed | 0 | 0 | 2023-07-31T21:16:31Z | 2023-08-03T16:27:28Z | 2023-08-03T16:27:27Z | CONTRIBUTOR | 0 | pydata/xarray/pulls/8034 |
The PR changes The PR adds a test, but also changes two pre-existing tests that allowed for non-deterministic ordering of the coordinates string. In reviewing the netCDF data model and CF convenstions, I confirmed that there is no requirement on the ordering of names in the coordinates attribute. I also learned that the global coordinates attribute created by XArray for non-dimension coordinates that are not associated with a variable is not compliant with CF conventions, as was discussed in 2014. In 2021, CF-Conventions 1.9 added "Domain Variables", which appear to provide a CF compliant way to handle this situation. I will likely open an enhancement issue to weigh making that change. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8034/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | pull | |||||
1503973868 | PR_kwDOAMm_X85F1kOI | 7393 | Preserve original dtype when accessing MultiIndex levels | itcarroll 3383837 | closed | 0 | 1 | 2022-12-20T04:34:24Z | 2022-12-24T04:37:45Z | 2022-12-24T00:07:42Z | CONTRIBUTOR | 0 | pydata/xarray/pulls/7393 |
Just what @benbovy said to do in #7250. Thank you! |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7393/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | pull | |||||
1433998942 | I_kwDOAMm_X85VeRZe | 7250 | stack casts int32 dtype coordinate to int64 | itcarroll 3383837 | closed | 0 | 5 | 2022-11-03T01:58:50Z | 2022-12-24T00:07:43Z | 2022-12-24T00:07:43Z | CONTRIBUTOR | What happened?The code example below results in What did you expect to happen?I expect the result to be Minimal Complete Verifiable Example```Python import xarray as xr import numpy as np ds = xr.Dataset(coords={'a': np.array([0], dtype='i4')}) ds['a'].values.dtype == ds.stack(b=('a',))['a'].values.dtype ``` MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.10.8 (main, Oct 13 2022, 10:17:43) [Clang 14.0.0 (clang-1400.0.29.102)]
python-bits: 64
OS: Darwin
OS-release: 21.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: (None, 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.9.0
xarray: 2022.10.0
pandas: 1.5.1
numpy: 1.23.4
scipy: 1.9.3
netCDF4: 1.6.1
pydap: None
h5netcdf: None
h5py: 3.7.0
Nio: None
zarr: None
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2022.10.2
distributed: None
matplotlib: 3.6.1
cartopy: 0.21.0
seaborn: None
numbagg: None
fsspec: 2022.10.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.5.0
pip: 22.1.2
conda: None
pytest: None
IPython: 8.6.0
sphinx: None
> /Users/icarroll/Library/Caches/pypoetry/virtualenvs/dotfiles-S-yQfRXO-py3.10/lib/python3.10/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7250/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]);