home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 512591623

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/3138#issuecomment-512591623 https://api.github.com/repos/pydata/xarray/issues/3138 512591623 MDEyOklzc3VlQ29tbWVudDUxMjU5MTYyMw== 1217238 2019-07-17T22:26:47Z 2019-07-17T22:26:47Z MEMBER

Thanks for the report.

I think should be relatively straightforward to fix, assuming that the underlying maptlotlib plotting functions handle 2D coordinates.

For reference, here's the full error traceback: ``` ValueError Traceback (most recent call last) <ipython-input-6-8d3b2b196427> in <module>() ----> 1 ds.data[0].plot.pcolormesh(x='x', y='zt')

3 frames /usr/local/lib/python3.6/dist-packages/xarray/plot/plot.py in plotmethod(_PlotMethods_obj, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, colors, center, robust, extend, levels, infer_intervals, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, kwargs) 697 for arg in ['_PlotMethods_obj', 'newplotfunc', 'kwargs']: 698 del allargs[arg] --> 699 return newplotfunc(allargs) 700 701 # Add to class _PlotMethods

/usr/local/lib/python3.6/dist-packages/xarray/plot/plot.py in newplotfunc(darray, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, center, robust, extend, levels, infer_intervals, colors, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, **kwargs) 583 # check if we need to broadcast one dimension 584 if xval.ndim < yval.ndim: --> 585 xval = np.broadcast_to(xval, yval.shape) 586 587 if yval.ndim < xval.ndim:

/usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py in broadcast_to(array, shape, subok) 180 [1, 2, 3]]) 181 """ --> 182 return _broadcast_to(array, shape, subok=subok, readonly=True) 183 184

/usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py in _broadcast_to(array, shape, subok, readonly) 127 it = np.nditer( 128 (array,), flags=['multi_index', 'refs_ok', 'zerosize_ok'] + extras, --> 129 op_flags=[op_flag], itershape=shape, order='C') 130 with it: 131 # never really has writebackifcopy semantics

ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (101,) and requested shape (101,51) ```

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