home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 811261936

This data as json

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/issues/5084#issuecomment-811261936 https://api.github.com/repos/pydata/xarray/issues/5084 811261936 MDEyOklzc3VlQ29tbWVudDgxMTI2MTkzNg== 3958036 2021-03-31T17:12:23Z 2021-03-31T17:12:23Z CONTRIBUTOR

I started working on this, and it seems to be almost trivial, except that plot_surface() requires it's x and y arguments to be 2d arrays. My guess is that I want to special-case the broadcasting in newplotfunc() here https://github.com/pydata/xarray/blob/ddc352faa6de91f266a1749773d08ae8d6f09683/xarray/plot/plot.py#L678-L684 but it's not immediately obvious to me how this bit works: * Why is it only ever xval that needs broadcasting? Couldn't the function have been called with a 2d x and a 1d y? * Why is it OK to check if xval.shape[0] == yval.shape[0]? I'm probably missing something, but don't see how this check can work without referring to the actual dimensions of x and y - what if the single dimension of x was actually the second dimension of y, but happened to have the same size as the first dimension of y? My first thought was that I just want to do x = x.broadcast_like(z) y = y.broadcast_like(z) actually, I think this is a bug. I'll make a new issue...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  842583817
Powered by Datasette · Queries took 0.646ms · About: xarray-datasette