issues
5 rows where comments = 1, type = "issue" and user = 14371165 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: 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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2215603817 | I_kwDOAMm_X86ED25p | 8892 | ffill's tolerance argument can be strings | Illviljan 14371165 | open | 0 | 1 | 2024-03-29T15:49:40Z | 2024-04-02T01:50:34Z | MEMBER | What happened?
But our typing assumes it's floats only: https://github.com/pydata/xarray/blob/2120808bbe45f3d4f0b6a01cd43bac4df4039092/xarray/core/resample.py#L69-L94 What did you expect to happen?Since our pytests pass, mypy should pass as well. Minimal Complete Verifiable Example```python import numpy as np import pandas as pd import xarray as xr https://github.com/pydata/xarray/blob/2120808bbe45f3d4f0b6a01cd43bac4df4039092/xarray/tests/test_groupby.py#L2016Test tolerance keyword for upsample methods bfill, pad, nearesttimes = pd.date_range("2000-01-01", freq="1D", periods=2) times_upsampled = pd.date_range("2000-01-01", freq="6h", periods=5) array = xr.DataArray(np.arange(2), [("time", times)]) Forward fillactual = array.resample(time="6h").ffill(tolerance="12h") expected = xr.DataArray([0.0, 0.0, 0.0, np.nan, 1.0], [("time", times_upsampled)]) xr.testing.assert_identical(expected, actual) ``` Environmentmaster |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8892/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
xarray 13221727 | issue | ||||||||
1046458609 | I_kwDOAMm_X84-X7Dx | 5945 | Start using `|` instead of `Union` or `Optional` when typing | Illviljan 14371165 | closed | 0 | 1 | 2021-11-06T08:12:57Z | 2022-06-04T04:26:03Z | 2022-06-04T04:26:03Z | MEMBER | Is your feature request related to a problem? Please describe.
To make it easier reading the typing it is now possible to use Here's an example how it looks like in pandas: https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py#L116-L134 Describe the solution you'd like
Replace for example:
* This would likely require adding References https://www.python.org/dev/peps/pep-0604/ |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5945/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
1174585854 | I_kwDOAMm_X85GAsH- | 6384 | xr.concat adds an extra array around elements | Illviljan 14371165 | closed | 0 | 1 | 2022-03-20T15:25:49Z | 2022-03-21T04:49:23Z | 2022-03-21T04:49:23Z | MEMBER | What happened?When concatenating dataarrays with Minimal Complete Verifiable Example```Python import numpy as np import xarray as xr shape = (2, 3, 4) darray = xr.DataArray(np.linspace(0, 1, num=np.prod(shape)).reshape(shape)) bins = [-1, 0, 1, 2] a = darray.groupby_bins("dim_0", bins).mean(...) a_nan = np.nan * a.isel(**{"dim_0_bins": -1}) out = xr.concat([a, a_nan], dim="dim_0_bins") print(out["dim_0_bins"]) ``` Relevant log outputCurrent result:
Should be: ```python <xarray.DataArray 'dim_0_bins' (dim_0_bins: 4)> array([Interval(-1, 0, closed='right'), Interval(0, 1, closed='right'), Interval(1, 2, closed='right'), Interval(1, 2, closed='right')], dtype=object) Coordinates: * dim_0_bins (dim_0_bins) object (-1, 0] (0, 1] (1, 2] (1, 2] ``` Anything else we need to know?No response Environment
xr.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:37:25) [MSC v.1916 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: ('Swedish_Sweden', '1252')
libhdf5: 1.10.6
libnetcdf: 4.7.4
xarray: 0.16.3.dev99+gc19467fb
pandas: 1.3.1
numpy: 1.21.5
scipy: 1.7.1
netCDF4: 1.5.6
pydap: installed
h5netcdf: 0.11.0
h5py: 2.10.0
Nio: None
zarr: 2.8.3
cftime: 1.5.0
nc_time_axis: 1.3.1
PseudoNetCDF: installed
rasterio: 1.2.6
cfgrib: None
iris: 3.0.4
bottleneck: 1.3.2
dask: 2021.10.0
distributed: 2021.10.0
matplotlib: 3.4.3
cartopy: 0.19.0.post1
seaborn: 0.11.1
numbagg: 0.2.1
fsspec: 2021.11.1
cupy: None
pint: 0.17
sparse: 0.12.0
setuptools: 49.6.0.post20210108
pip: 21.2.4
conda: None
pytest: 6.2.4
IPython: 7.31.0
sphinx: 4.3.2
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6384/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
931796211 | MDU6SXNzdWU5MzE3OTYyMTE= | 5546 | Limit number of displayed dimensions in repr | Illviljan 14371165 | closed | 0 | 1 | 2021-06-28T17:25:18Z | 2022-01-03T17:38:48Z | 2022-01-03T17:38:48Z | MEMBER | What happened: Dimension doesn't seem to be limited when there are too many of them. See example below. This slows down the repr significantly and is quite unreadable to me. What you expected to happen: To be limited so that it aligns with whatever the maximum line length is for variables. It's also fine if it continues on a couple of rows below in similar fashion to variables. Minimal Complete Verifiable Example:
This is probably a bit of an edge case. My real datasets usually have around 12 "dimensions" and coords, +2000 variables, 50 attrs.
Anything else we need to know?: Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 15:50:08) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 byteorder: little LC_ALL: None LANG: en libhdf5: 1.10.6 libnetcdf: None xarray: 0.18.2 pandas: 1.2.4 numpy: 1.20.3 scipy: 1.6.3 netCDF4: None pydap: None h5netcdf: None h5py: 3.2.1 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2021.05.0 distributed: 2021.05.0 matplotlib: 3.4.2 cartopy: None seaborn: 0.11.1 numbagg: None pint: None setuptools: 49.6.0.post20210108 pip: 21.1.2 conda: 4.10.1 pytest: 6.2.4 IPython: 7.24.1 sphinx: 4.0.2 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5546/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
779938616 | MDU6SXNzdWU3Nzk5Mzg2MTY= | 4770 | Interpolation always returns floats | Illviljan 14371165 | open | 0 | 1 | 2021-01-06T03:16:43Z | 2021-01-12T16:30:54Z | MEMBER | What happened: When interpolating datasets integer arrays are forced to floats. What you expected to happen: To retain the same dtype after interpolation. Minimal Complete Verifiable Example: ```python import numpy as np import dask.array as da a = np.arange(0, 2) b = np.core.defchararray.add("long_variable_name", a.astype(str)) coords = dict(time=da.array([0, 1])) data_vars = dict() for v in b: data_vars[v] = xr.DataArray( name=v, data=da.array([0, 1], dtype=int), dims=["time"], coords=coords, ) ds1 = xr.Dataset(data_vars) print(ds1) Out[35]: <xarray.Dataset> Dimensions: (time: 4) Coordinates: * time (time) float64 0.0 0.5 1.0 2.0 Data variables: long_variable_name0 (time) int32 dask.array<chunksize=(4,), meta=np.ndarray> long_variable_name1 (time) int32 dask.array<chunksize=(4,), meta=np.ndarray> Interpolate:ds1 = ds1.interp( time=da.array([0, 0.5, 1, 2]), assume_sorted=True, method="linear", kwargs=dict(fill_value="extrapolate"), ) dask array thinks it's an integer array:print(ds1.long_variable_name0) Out[55]: <xarray.DataArray 'long_variable_name0' (time: 4)> dask.array<dask_aware_interpnd, shape=(4,), dtype=int32, chunksize=(4,), chunktype=numpy.ndarray> Coordinates: * time (time) float64 0.0 0.5 1.0 2.0 But once computed it turns out is a float:print(ds1.long_variable_name0.compute()) Out[38]: <xarray.DataArray 'long_variable_name0' (time: 4)> array([0. , 0.5, 1. , 2. ]) Coordinates: * time (time) float64 0.0 0.5 1.0 2.0 ``` Anything else we need to know?:
An easy first step is to also force The more difficult way is to somehow be able to change back the dataarrays into the old dtype without affecting performance. I did a test simply adding I was thinking the conversion to floats in scipy could be avoided altogether by adding a (non-)public option to ignore any dtype checks and just let the user handle the "unsafe" interpolations. Related: https://github.com/scipy/scipy/issues/11093 Environment: Output of <tt>xr.show_versions()</tt>xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows libhdf5: 1.10.4 libnetcdf: None xarray: 0.16.2 pandas: 1.1.5 numpy: 1.17.5 scipy: 1.4.1 netCDF4: None pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.2 dask: 2020.12.0 distributed: 2020.12.0 matplotlib: 3.3.2 cartopy: None seaborn: 0.11.1 numbagg: None pint: None setuptools: 51.0.0.post20201207 pip: 20.3.3 conda: 4.9.2 pytest: 6.2.1 IPython: 7.19.0 sphinx: 3.4.0 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4770/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
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]);