home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1124863541

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/6597#issuecomment-1124863541 https://api.github.com/repos/pydata/xarray/issues/6597 1124863541 IC_kwDOAMm_X85DDA41 22245117 2022-05-12T11:12:39Z 2022-05-12T11:12:39Z CONTRIBUTOR

Thanks - I think I might be misunderstanding how the new implementation works. I tried the following changes, but both of them return an error: python xr.polyval(values - values[0], polyfit_coefficients) Traceback (most recent call last): File "/Users/mattia/MyGit/test.py", line 31, in <module> xr.polyval(values - values[0], polyfit_coefficients) File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1908, in polyval coord = _ensure_numeric(coord) # type: ignore # https://github.com/python/mypy/issues/1533 ? File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1949, in _ensure_numeric return to_floatable(data) File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1939, in to_floatable x.data, ValueError: cannot include dtype 'm' in a buffer

python xr.polyval(azimuth_time.coords["azimuth_time"], polyfit_coefficients) Traceback (most recent call last): File "/Users/mattia/MyGit/test.py", line 31, in <module> xr.polyval(azimuth_time.coords["azimuth_time"], polyfit_coefficients) File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1908, in polyval coord = _ensure_numeric(coord) # type: ignore # https://github.com/python/mypy/issues/1533 ? File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1949, in _ensure_numeric return to_floatable(data) File "/Users/mattia/MyGit/xarray/xarray/core/computation.py", line 1938, in to_floatable data=datetime_to_numeric( File "/Users/mattia/MyGit/xarray/xarray/core/duck_array_ops.py", line 434, in datetime_to_numeric array = array - offset numpy.core._exceptions._UFuncBinaryResolutionError: ufunc 'subtract' cannot use operands with types dtype('<m8[ns]') and dtype('<M8[D]')

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