home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 748677944

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/4717#issuecomment-748677944 https://api.github.com/repos/pydata/xarray/issues/4717 748677944 MDEyOklzc3VlQ29tbWVudDc0ODY3Nzk0NA== 14808389 2020-12-20T22:11:54Z 2020-12-20T22:42:46Z MEMBER

this fails because pandas changed the way they treat dask arrays passed to their constructor: we now get a series of object dtype filled with 0d dask arrays.

We can work around that by computing x before passing it to pandas.DataFrame in the to_dask_dataframe tests: python expected_pd = pd.DataFrame({"a": x.compute(), "b": y}, index=pd.Index(t, name="t")) or by assigning the initial numpy array to x and converting it to a dask array immediately before passing it to the xr.Dataset constructor: ```python x = np.random.randn(10)

...

ds = xr.Dataset({"a": ("t", da.from_array(x, chunks=4)), "b": ("t", y), "t": ("t", t)}) ``` (and something similar for the other two failing tests)

But maybe we should just ask the pandas devs whether that was intentional?

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