home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 609038408

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/3931#issuecomment-609038408 https://api.github.com/repos/pydata/xarray/issues/3931 609038408 MDEyOklzc3VlQ29tbWVudDYwOTAzODQwOA== 30388627 2020-04-04T14:39:27Z 2020-04-04T14:39:27Z NONE

@mathause For .values, if I delete vectorize=True, I got this error: File "/home/xin/miniconda3/envs/satpy/lib/python3.7/site-packages/scipy/interpolate/interpolate.py", line 455, in __init__ raise ValueError("the x array must have exactly one dimension.") ValueError: the x array must have exactly one dimension. Then, I keep vectorize=True deleted and use the np.interp, I got this error: File "/mnt/d/Github/s5p-wrfchem/s5p_utils.py", line 264, in interp1d_np return np.interp(xi, x, data) File "<__array_function__ internals>", line 6, in interp File "/home/xin/miniconda3/envs/satpy/lib/python3.7/site-packages/numpy/lib/function_base.py", line 1412, in interp return interp_func(x, xp, fp, left, right) ValueError: object too deep for desired array If I let vectorize=True shows again and use the np.interp, I got the error mentioned before: File "/home/xin/miniconda3/envs/satpy/lib/python3.7/site-packages/numpy/lib/function_base.py", line 1830, in _update_dim_sizes % (dim, size, dim_sizes[dim])) ValueError: inconsistent size for core dimension 'dim0': 2 vs 39

For the one without .values, this is the result of repr(s5p['p']): <xarray.DataArray (bottom_top: 25, y: 389, x: 450)> dask.array<where, shape=(25, 389, 450), dtype=float32, chunksize=(25, 389, 450), chunktype=numpy.ndarray> Coordinates: * bottom_top (bottom_top) int32 0 1 2 3 4 5 6 7 8 ... 17 18 19 20 21 22 23 24 vertices int32 0 crs object +proj=latlong +datum=WGS84 +ellps=WGS84 +type=crs Dimensions without coordinates: y, x Attributes: name: p resolution: None calibration: None polarization: None level: None modifiers: () units: hPa After the bottom_up in renamed to new_dim, it works without error for both scipy and numpy interpolation function.

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