home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

22 rows where author_association = "CONTRIBUTOR" and user = 1562854 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 11

  • DOC: cross ref the groupby tutorial 6
  • Regression in datetime handling in plots 5
  • Creation of an empty DataArray 2
  • Hangs while saving netcdf file opened using xr.open_mfdataset with lock=None 2
  • Fix "Chunksize cannot exceed dimension size" 1
  • Starter property-based test suite 1
  • Link API docs to user guide and other examples 1
  • Spurious lines of the pcolormesh example 1
  • TST: check datetime converter is Matplotlibs 1
  • Date in matplotlib conversion does not handle "YYYY-MM-DD" format for xarray=0.21.1 1
  • `plot.imshow` with datetime coordinate fails 1

user 1

  • jklymak · 22 ✖

author_association 1

  • CONTRIBUTOR · 22 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1443962840 https://github.com/pydata/xarray/pull/7555#issuecomment-1443962840 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85WER_Y jklymak 1562854 2023-02-24T16:30:02Z 2023-02-24T16:30:02Z CONTRIBUTOR

(BTW if this gets merged feel free to squash my commits, I'm just keeping the history in case someone wants a previous version)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1443909457 https://github.com/pydata/xarray/pull/7555#issuecomment-1443909457 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85WEE9R jklymak 1562854 2023-02-24T16:05:36Z 2023-02-24T16:05:36Z CONTRIBUTOR

Changed to :ref:`groupby` Users guide explanation of how to group and bin data.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1443898487 https://github.com/pydata/xarray/pull/7555#issuecomment-1443898487 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85WECR3 jklymak 1562854 2023-02-24T16:00:12Z 2023-02-24T16:00:12Z CONTRIBUTOR

@keewis That comes out as

which is fine. I may change the description to be less repetitive with the title of the user-guide page if that is the preferred format for this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1442842228 https://github.com/pydata/xarray/pull/7555#issuecomment-1442842228 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85WAAZ0 jklymak 1562854 2023-02-24T05:47:03Z 2023-02-24T05:47:03Z CONTRIBUTOR

That renders OK

However, I find it kind of hard to tell that is leading to the user docs. Trying

rst :ref:`Users guide: group and bin data <groupby>`

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1442775155 https://github.com/pydata/xarray/pull/7555#issuecomment-1442775155 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85V_wBz jklymak 1562854 2023-02-24T04:00:09Z 2023-02-24T04:00:09Z CONTRIBUTOR

I can. Honestly I wasn't sure :ref: would work there? But I can try it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1442689138 https://github.com/pydata/xarray/pull/7555#issuecomment-1442689138 https://api.github.com/repos/pydata/xarray/issues/7555 IC_kwDOAMm_X85V_bBy jklymak 1562854 2023-02-24T02:01:52Z 2023-02-24T02:01:52Z CONTRIBUTOR

Rendered docs: https://xray--7555.org.readthedocs.build/en/7555/generated/xarray.Dataset.groupby.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: cross ref the groupby tutorial 1597701713
1137286712 https://github.com/pydata/xarray/issues/6629#issuecomment-1137286712 https://api.github.com/repos/pydata/xarray/issues/6629 IC_kwDOAMm_X85DyZ44 jklymak 1562854 2022-05-25T14:02:13Z 2022-05-25T14:02:13Z CONTRIBUTOR

See also https://github.com/pydata/xarray/issues/1435 and https://github.com/matplotlib/matplotlib/issues/22105

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `plot.imshow` with datetime coordinate fails 1244977848
1049066201 https://github.com/pydata/xarray/issues/6263#issuecomment-1049066201 https://api.github.com/repos/pydata/xarray/issues/6263 IC_kwDOAMm_X84-h3rZ jklymak 1562854 2022-02-23T18:09:32Z 2022-02-23T18:09:32Z CONTRIBUTOR

It could, after the units are set to dates, but all it would do is pass to datetime64, so the recommendation would be that users do that explicitly.

If the units are not set to dates (ie. this is the first call on the axis) then strings are interpreted as categories in Matplotlib, and all sorts of hilarity ensues if the strings are all dates....

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Date in matplotlib conversion does not handle "YYYY-MM-DD" format for xarray=0.21.1 1130073503
1003582857 https://github.com/pydata/xarray/pull/6128#issuecomment-1003582857 https://api.github.com/repos/pydata/xarray/issues/6128 IC_kwDOAMm_X8470XWJ jklymak 1562854 2022-01-01T16:45:01Z 2022-01-01T16:45:01Z CONTRIBUTOR

The point of my original concern was the case where the automatic import should not nbe happening. I think that the new version of my test should work with the revert of #6109.

I agree that the import logic is a bit of a pain. OTOH I'm not sure how to make it better.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  TST: check datetime converter is Matplotlibs 1091822549
1003563370 https://github.com/pydata/xarray/issues/6102#issuecomment-1003563370 https://api.github.com/repos/pydata/xarray/issues/6102 IC_kwDOAMm_X8470Slq jklymak 1562854 2022-01-01T14:02:31Z 2022-01-01T14:02:31Z CONTRIBUTOR

Sure see https://github.com/pydata/xarray/pull/6128

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression in datetime handling in plots 1087126812
1003558439 https://github.com/pydata/xarray/issues/6102#issuecomment-1003558439 https://api.github.com/repos/pydata/xarray/issues/6102 IC_kwDOAMm_X8470RYn jklymak 1562854 2022-01-01T13:20:08Z 2022-01-01T13:20:08Z CONTRIBUTOR

BTW, maybe you could/should add a test for this behaviour?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression in datetime handling in plots 1087126812
1003558389 https://github.com/pydata/xarray/issues/6102#issuecomment-1003558389 https://api.github.com/repos/pydata/xarray/issues/6102 IC_kwDOAMm_X8470RX1 jklymak 1562854 2022-01-01T13:19:39Z 2022-01-01T13:19:39Z CONTRIBUTOR

I checked the code from above, and it has the Matplotlib unit handlers rather than the pandas

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression in datetime handling in plots 1087126812
1002699860 https://github.com/pydata/xarray/issues/6102#issuecomment-1002699860 https://api.github.com/repos/pydata/xarray/issues/6102 IC_kwDOAMm_X847w_xU jklymak 1562854 2021-12-29T17:25:01Z 2021-12-29T17:25:01Z CONTRIBUTOR

As I'm away from a computer for a few days so can't double check, but I did bisect the problem to the pr that was reverted.

However you could keep this open for a more fulsome discussion of date handling and whether xarray wants to use the pandas or matplotlib converters. I would actually be pretty happy if pandas also just used matplotlibs converters - we already jump through some hoops to make data frames work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression in datetime handling in plots 1087126812
1000287742 https://github.com/pydata/xarray/issues/6102#issuecomment-1000287742 https://api.github.com/repos/pydata/xarray/issues/6102 IC_kwDOAMm_X847ny3- jklymak 1562854 2021-12-23T13:00:28Z 2021-12-23T13:00:28Z CONTRIBUTOR

Hi @Illviljan that is correct. However after https://github.com/pydata/xarray/pull/5794 xarray is more aggressively making the pandas choice for the user.

I'll play with it a bit to see if just removing your explicit registration fixes the problem. However changing the datetime converter would be a breaking change (to your plotting) that I'm not sure you want.

This is a tricky problem that I'm not sure matplotlib has handled properly (full disclosure, I'm on the mpl dev team and usually handle datetime issues, though I didn't design our units registry). Having a registry that users can change is very flexible. However when downstream libraries like xarray or pandas affect user plotting just by importing the package, it leads to considerable confusion as users don't necessarily know this has happened or how to get back to the Matplotlib default. Particularly if they are not using the package's plotting utilities, but just the other features and/or data types (for instance I love xarray and use it all the time in my data analysis, but I rarely use the plotting convenience functions)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression in datetime handling in plots 1087126812
953641308 https://github.com/pydata/xarray/issues/5901#issuecomment-953641308 https://api.github.com/repos/pydata/xarray/issues/5901 IC_kwDOAMm_X84412lc jklymak 1562854 2021-10-28T08:48:55Z 2021-10-28T08:48:55Z CONTRIBUTOR

Just to explain the issue a bit: pcolormesh(x, y, Z, shading='flat') was the default. If shape(Z) used to be (len(y), len(x)) matplotlib would drop, without warning, the last row and column of Z so that y and x were one larger than Z.

The new default is 'auto' where in the case above it uses shading='nearest' to create new x and y co-ordinates with the dumbest algorithm possible of placing them in the midpoints, and adding two new points on the outside. So rather than drop data from Z, we add to the x and y co-ordinates.

That is usually fine, except the midpoint between 0 and 360 is 180, and we get a weird wrap. Cartopy (xarray) accounted for this with the old shading by adding a NaN. I've not followed what they are doing now.

To get the old behaviour you simply need to do pcolormesh(x, y, Z[:-1, :-1], shading='flat') or make x and y one larger than Z in each dimension and specify the the corners of the quadrilaterals.

Sorry this is a pain, but the old behaviour of silently dropping data, while having a long lineage going back to Matlab, was deemed unacceptable. However, if this continues to be a nuisance to folks, I'm sure matplotlib would consider a new shading argument, something like 'flat-drop', or somesuch that would do the data dropping for you.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Spurious lines of the pcolormesh example 1037814301
926732548 https://github.com/pydata/xarray/issues/5816#issuecomment-926732548 https://api.github.com/repos/pydata/xarray/issues/5816 IC_kwDOAMm_X843PNEE jklymak 1562854 2021-09-24T15:48:08Z 2021-09-24T15:48:08Z CONTRIBUTOR

I think doing both is always appreciated: short "how to" with a common pattern or two and then a "see also".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Link API docs to user guide and other examples 1006588071
731254101 https://github.com/pydata/xarray/issues/3961#issuecomment-731254101 https://api.github.com/repos/pydata/xarray/issues/3961 MDEyOklzc3VlQ29tbWVudDczMTI1NDEwMQ== jklymak 1562854 2020-11-20T16:01:03Z 2020-11-20T16:01:03Z CONTRIBUTOR

Lock false sometimes throws hd5 error. No clear solution.

I haven't seen that yet, but I'd still far prefer an occasional error to a hung process.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Hangs while saving netcdf file opened using xr.open_mfdataset with lock=None 597657663
730007824 https://github.com/pydata/xarray/issues/3961#issuecomment-730007824 https://api.github.com/repos/pydata/xarray/issues/3961 MDEyOklzc3VlQ29tbWVudDczMDAwNzgyNA== jklymak 1562854 2020-11-18T22:51:47Z 2020-11-18T22:51:47Z CONTRIBUTOR

I have the same behaviour with MacOS (10.15). xarray=0.16.1, dask=2.30.0, netcdf4=1.5.4. Sometimes saves, sometimes doesn't. lock=False seems to work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Hangs while saving netcdf file opened using xr.open_mfdataset with lock=None 597657663
371718795 https://github.com/pydata/xarray/pull/1972#issuecomment-371718795 https://api.github.com/repos/pydata/xarray/issues/1972 MDEyOklzc3VlQ29tbWVudDM3MTcxODc5NQ== jklymak 1562854 2018-03-09T05:38:23Z 2018-03-09T05:38:23Z CONTRIBUTOR

As pointed out on the matplotlib gitter:

If you run

```python import numpy as np import xarray as xr import matplotlib.pyplot as plt

for i in range(200): xr.DataArray(np.array([[0, 0], [0, 0]], dtype=np.uint8)).plot.pcolormesh() at step 165 you will get: File "/Users/jklymak/matplotlib/lib/matplotlib/figure.py", line 236, in update raise ValueError('left cannot be >= right') ValueError: left cannot be >= right ``` Why? Because you have made a plot that if it displays looks like:

Are you sure your test isn't doing something similar? At some point there just isn't room for more colorbars! Adding a plt.clf() can cure the problem.

Its also is possible you are hitting floating point overflows with your test. At some point Matplotlib needs to be able to manipulate the data that comes in, and if you operate near the maximum number your data type can handle, you'll have problems. Just like you would if you just did

python a = 2*xr.DataArray(np.array([[0, 0], [0, 1e308]])) you will get: /Users/jklymak/anaconda3/envs/matplotlibdev/lib/python3.6/site-packages/xarray/core/variable.py:1165: RuntimeWarning: overflow encountered in multiply So maybe your hypothesis tester could be constrained to stay away from floating point overflows?

Matplotlib indeed has flaws and quirks, but if you are finding bugs it would be good to isolate them.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Starter property-based test suite 303103716
347328007 https://github.com/pydata/xarray/pull/1707#issuecomment-347328007 https://api.github.com/repos/pydata/xarray/issues/1707 MDEyOklzc3VlQ29tbWVudDM0NzMyODAwNw== jklymak 1562854 2017-11-27T21:06:48Z 2017-11-27T21:06:48Z CONTRIBUTOR

I had this error in 0.9.5. 0.10.0 definitely fixes it. Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix "Chunksize cannot exceed dimension size" 273115110
275979038 https://github.com/pydata/xarray/issues/277#issuecomment-275979038 https://api.github.com/repos/pydata/xarray/issues/277 MDEyOklzc3VlQ29tbWVudDI3NTk3OTAzOA== jklymak 1562854 2017-01-30T04:42:12Z 2017-01-30T04:42:12Z CONTRIBUTOR

OK, great! I figured it out. Something like the below works; @rabernat had pointed to a similar solution, but I didn't quite understand what dask.array.map_blocks was doing.

``` import xmitgcm import xarray as xr data = xmitgcm.open_mdsdataset(dirname='./',prefix={'T'},iters=12600,read_grid=True,geometry='cartesian',endian='<', chunks={'Z':1,'time':1})

def interpolateAtDepth(T,x0,y0,x,y): import scipy.interpolate if np.shape(T)[-1]>1: xout=np.zeros((1,1,ny,nx))
fit=scipy.interpolate.RectBivariateSpline(x0,y0,T[0,0,:,:].T) xout = fit(x,y).T else: xout=np.ones((1,1,1,1)) return xout

x, y, nx, ny are determined elsewhere, but set the new grid...

tm = data['T'].data.map_blocks(interpolateAtDepth,data['XC'].values,data['YC'].values,x,y,chunks=(1,1,ny,nx)) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Creation of an empty DataArray 48301141
275776968 https://github.com/pydata/xarray/issues/277#issuecomment-275776968 https://api.github.com/repos/pydata/xarray/issues/277 MDEyOklzc3VlQ29tbWVudDI3NTc3Njk2OA== jklymak 1562854 2017-01-27T21:17:57Z 2017-01-27T21:17:57Z CONTRIBUTOR

Given the dask integration, being able to initialize DataArrays that are chunked would be very helpful. I want to map from an old x-y-z grid to a new one, and theoretically it could be too memory intensive to keep the new grid in memory, so it would be nice to initialize an empty one and then fill it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Creation of an empty DataArray 48301141

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 18.213ms · About: xarray-datasette