html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/3913#issuecomment-610472155,https://api.github.com/repos/pydata/xarray/issues/3913,610472155,MDEyOklzc3VlQ29tbWVudDYxMDQ3MjE1NQ==,1941408,2020-04-07T15:59:11Z,2020-04-07T15:59:11Z,CONTRIBUTOR,"Two words. It may be more appropriate to not only check that vmin and vmax are of opposite signe, but also one of them is not to close from zero, like [-0.01, 100]. This may also be extended to used positive and negative colomaps when vmin and vmax are of the same sign and one of them is close to zeros.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,589833027 https://github.com/pydata/xarray/issues/1815#issuecomment-538993551,https://api.github.com/repos/pydata/xarray/issues/1815,538993551,MDEyOklzc3VlQ29tbWVudDUzODk5MzU1MQ==,1941408,2019-10-07T12:48:01Z,2019-10-07T12:48:01Z,CONTRIBUTOR,"@andersy005 here is a very little demo of linear regression using lstsq (not linregress) in which only slope and intercept are kept. It is here applied to an array of sea surface temperature. I hope it can help. ```python ds = xr.open_dataset('sst_2D.nc', chunks={'X': 30, 'Y': 30}) def ulinregress(x, y): # the universal function ny, nx, nt = y.shape ; y = np.moveaxis(y, -1, 0).reshape((nt, -1)) # nt, ny*nx return np.linalg.lstsq(np.vstack([x, np.ones(nt)]).T, y)[0].T.reshape(ny, nx, 2) time = (ds['time'] - np.datetime64(""1950-01-01"")) / np.timedelta64(1, 'D') ab = xr.apply_ufunc(ulinregress, time, ds['sst'], dask='parallelized', input_core_dims=[['time'], ['time']], output_dtypes=['d'], output_sizes={'coef': 2, }, output_core_dims=[['coef']]) series = ds['sst'][:, 0, 0].load() line = series.copy() ; line[:] = ab[0, 0, 0] * time + ab[0, 0, 1] series.plot(label='Original') ; line.plot(label='Linear regression') ; plt.legend(); ```","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,287223508 https://github.com/pydata/xarray/pull/3302#issuecomment-531674432,https://api.github.com/repos/pydata/xarray/issues/3302,531674432,MDEyOklzc3VlQ29tbWVudDUzMTY3NDQzMg==,1941408,2019-09-16T07:50:26Z,2019-09-16T07:50:26Z,CONTRIBUTOR,"> > > Thanks @stefraynaud . I'm having trouble figuring out defining the length of a gap in the irregular coordinate case. > > e.g. > > ``` > da4 = xr.DataArray([np.nan, np.nan, np.nan, 1, np.nan, np.nan, 4, np.nan, np.nan], > dims=[""y""], coords={""y"": [0, 2, 5, 6, 7, 8, 10, 12, 14]}) > ``` > > ``` > > array([nan, nan, nan, 1., nan, nan, 4., nan, nan]) > Coordinates: > * y (y) int64 0 2 5 6 7 8 10 12 14 > ``` > > What is the length of these three gaps given that xarray doesn't have any understanding of grids? @dcherian In your example, as said @max-sixty, the middle gap has a length of `10-6=4`. The length gaps at the edges cannot be computed but it doesn't matter, and the algo should work as when simply counting the nans. I'll have a look the code, maybe for a new PR after this one.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,492866552 https://github.com/pydata/xarray/pull/3302#issuecomment-531248632,https://api.github.com/repos/pydata/xarray/issues/3302,531248632,MDEyOklzc3VlQ29tbWVudDUzMTI0ODYzMg==,1941408,2019-09-13T14:00:30Z,2019-09-13T14:00:30Z,CONTRIBUTOR,"Nice feature. How about adding the support max gaps expressed in physical units, since coordinates may be irregular?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,492866552 https://github.com/pydata/xarray/issues/2332#issuecomment-409875858,https://api.github.com/repos/pydata/xarray/issues/2332,409875858,MDEyOklzc3VlQ29tbWVudDQwOTg3NTg1OA==,1941408,2018-08-02T10:05:12Z,2018-08-02T10:05:12Z,CONTRIBUTOR,"A call to ``.getValue()`` before the comparison of the content should do the trick for both axes (coordinates) and variables. Howerver for variables and 2D axes, the comparison will fail if the fill_value is different since ``.getValue()`` is basically a call to ``.filled()``. In this case, a call to ``.asma()`` is more appropriate if the assertion function handles masked values. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,346313546 https://github.com/pydata/xarray/pull/2262#issuecomment-402395346,https://api.github.com/repos/pydata/xarray/issues/2262,402395346,MDEyOklzc3VlQ29tbWVudDQwMjM5NTM0Ng==,1941408,2018-07-04T07:53:01Z,2018-07-04T07:53:01Z,CONTRIBUTOR,Thanks @fmaussion ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,337563023 https://github.com/pydata/xarray/pull/2262#issuecomment-402391046,https://api.github.com/repos/pydata/xarray/issues/2262,402391046,MDEyOklzc3VlQ29tbWVudDQwMjM5MTA0Ng==,1941408,2018-07-04T07:35:50Z,2018-07-04T07:35:50Z,CONTRIBUTOR,Is it up to me to resolve the whats-new.rst conflict?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,337563023