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/5654#issuecomment-908625623,https://api.github.com/repos/pydata/xarray/issues/5654,908625623,IC_kwDOAMm_X842KIbX,2190658,2021-08-30T19:27:15Z,2021-08-30T19:27:15Z,MEMBER,"Thank you guys for the amazing investigation into the issues here. 🤗 I was basically pinpointed at the issues from my point of view.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-908317984,https://api.github.com/repos/pydata/xarray/issues/5654,908317984,IC_kwDOAMm_X842I9Ug,2190658,2021-08-30T12:55:16Z,2021-08-30T12:55:16Z,MEMBER,I have fixed the reported issues and released version 0.13.0 with the fixes included.,"{""total_count"": 4, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 3, ""rocket"": 1, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906723769,https://api.github.com/repos/pydata/xarray/issues/5654,906723769,IC_kwDOAMm_X842C4G5,2190658,2021-08-26T20:33:39Z,2021-08-26T20:33:39Z,MEMBER,"> Third and final issue is when ``numpy.broadcast_to`` is applied to the output of zeros_like: > > ``` > > >>> import sparse > > >>> s = sparse.COO.from_numpy([0, 0, 1, 2]) > > >>> np.broadcast_to(np.zeros_like(s.todense(), shape=()), (3, )) > > array([0, 0, 0]) > > >>> np.broadcast_to(np.zeros_like(s, shape=()), (3, )) > > ValueError: The data length does not match the coordinates given. > > len(data) = 0, but 3 coords specified. > > ``` This seems like a genuine bug, please file it on our tracker if possible.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906684380,https://api.github.com/repos/pydata/xarray/issues/5654,906684380,IC_kwDOAMm_X842Cufc,6213168,2021-08-26T19:30:25Z,2021-08-26T19:50:20Z,MEMBER,"Third and final issue is when ``numpy.broadcast_to`` is applied to the output of zeros_like: ``` >>> import sparse >>> s = sparse.COO.from_numpy([0, 0, 1, 2]) >>> np.broadcast_to(np.zeros_like(s.todense(), shape=()), (3, )) array([0, 0, 0]) >>> np.broadcast_to(np.zeros_like(s, shape=()), (3, )) ValueError: The data length does not match the coordinates given. len(data) = 0, but 3 coords specified. ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906633901,https://api.github.com/repos/pydata/xarray/issues/5654,906633901,IC_kwDOAMm_X842CiKt,6213168,2021-08-26T18:15:29Z,2021-08-26T19:47:12Z,MEMBER,"Ah, shape= was very recently added in 0.12.0. It wasn't there in 0.11.2. [EDIT] It is not the only problem. Investigating further.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906656030,https://api.github.com/repos/pydata/xarray/issues/5654,906656030,IC_kwDOAMm_X842Cnke,6213168,2021-08-26T18:47:32Z,2021-08-26T18:47:42Z,MEMBER,"The second issue is that ``sparse.zeros_like`` doesn't accept the ``order=`` parameter, which is required by the same dask code linked above (it's in the kwargs in dask/wrap.py:133). This in turn triggers an unfortunate handling of TypeError on behalf of ``@curry``, which obfuscates the exception.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906621248,https://api.github.com/repos/pydata/xarray/issues/5654,906621248,IC_kwDOAMm_X842CfFA,6213168,2021-08-26T17:56:52Z,2021-08-26T18:02:53Z,MEMBER,"``da.zeros_like(a)`` internally invokes ``da.zeros(a.shape, meta=a._meta)`` which internally invokes ``np.broadcast(np.zeros_like(a._meta, shape=1), a.shape)`` The problem is that sparse.zeros_like does not accept the shape= optional parameter, which is new in numpy 1.17. This is where it gets triggered: https://github.com/dask/dask/blob/85f0b14bd36a5135ce51aeee067b6207374b00c4/dask/array/wrap.py#L128-L168 I don't think dask should write a workaround to this, and it should be just fixed upstream? CC @jrbourbeau for opinion.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906584459,https://api.github.com/repos/pydata/xarray/issues/5654,906584459,IC_kwDOAMm_X842CWGL,6213168,2021-08-26T17:02:09Z,2021-08-26T17:02:09Z,MEMBER,"Narrowed it down. ```python >>> import dask.array as da >>> import sparse >>> s = sparse.COO.from_numpy([0, 0, 1, 2]) >>> a = da.from_array(s) >>> z = da.zeros_like(a) >>> z dask.array >>> z.compute() ``` numpy-1.20.1 dask-2021.3.0 sparse-0.11.2 ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906487010,https://api.github.com/repos/pydata/xarray/issues/5654,906487010,IC_kwDOAMm_X842B-Ti,14808389,2021-08-26T14:57:13Z,2021-08-26T14:57:13Z,MEMBER,"> Would it be possible to have the two issues tracked by separate tickets? definitely, let's keep this one focused on `sparse`. I think removing the label should be enough to have CI open a new issue (not sure, though).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906479974,https://api.github.com/repos/pydata/xarray/issues/5654,906479974,IC_kwDOAMm_X842B8lm,6213168,2021-08-26T14:48:38Z,2021-08-26T14:48:38Z,MEMBER,I see now. I got really confused by the matplotlib issue which is what the opening post of this ticket is about. Would it be possible to have the two issues tracked by separate tickets?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906477357,https://api.github.com/repos/pydata/xarray/issues/5654,906477357,IC_kwDOAMm_X842B78t,2448579,2021-08-26T14:45:28Z,2021-08-26T14:45:28Z,MEMBER,"> The failure in xarray/tests/test_sparse.py::test_chunk doesn't appear anywhere in recent CI runs It was xfailed in #5729 , maybe that explains it","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-906475469,https://api.github.com/repos/pydata/xarray/issues/5654,906475469,IC_kwDOAMm_X842B7fN,6213168,2021-08-26T14:43:13Z,2021-08-26T14:43:13Z,MEMBER,"I'm a bit lost. The failure in ``xarray/tests/test_sparse.py::test_chunk`` doesn't appear anywhere in recent CI runs and I can't reproduce it locally. The ongoing failures in upstream-dev: ``` FAILED xarray/tests/test_plot.py::TestFacetGrid::test_can_set_norm FAILED xarray/tests/test_plot.py::TestCFDatetimePlot::test_cfdatetime_line_plot FAILED xarray/tests/test_plot.py::TestCFDatetimePlot::test_cfdatetime_pcolormesh_plot FAILED xarray/tests/test_plot.py::TestCFDatetimePlot::test_cfdatetime_contour_plot ``` Aren't in any way related to either sparse or dask; they appear when I upgrade matplotlib from 3.4.3 to 3.5.0b1.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-903100279,https://api.github.com/repos/pydata/xarray/issues/5654,903100279,IC_kwDOAMm_X8411Dd3,14808389,2021-08-21T11:07:49Z,2021-08-21T11:07:49Z,MEMBER,"FWIW, the upstream-dev CI [installs](https://github.com/pydata/xarray/runs/3386757251?check_suite_focus=true#step:4:1223) `sparse=0.12.0+55.ge706c2e` (i.e. the most recent state of the repository). However, since our other CI is also failing I guess this does not change much.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-899874279,https://api.github.com/repos/pydata/xarray/issues/5654,899874279,IC_kwDOAMm_X841ov3n,14808389,2021-08-16T23:06:44Z,2021-08-17T10:57:50Z,MEMBER,"We already require `pandas>=1.0` and I guess we can bump `numpy` (NEP29 allows it for releases after Jul 26), but I'm not sure why that would be an issue for the `upstream-dev` CI. For reference, the installed versions are`numpy=1.22.0.dev0+716.g20807c743` and `pandas=1.4.0.dev0+436.gfcf3f24e02`. ~Interestingly, the installation of `dask` from github started failing two days ago (see the last [succeeding](https://github.com/pydata/xarray/runs/3326683017?check_suite_focus=true#step:4:1225) and the first [failing](https://github.com/pydata/xarray/runs/3331106279?check_suite_focus=true#step:4:1205) install – unless I'm misinterpreting the logs?). Any idea how to fix that?~ The most recent run correctly installed `dask` so I guess this was a temporary issue (or `dask` resolved this really quickly)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-898932809,https://api.github.com/repos/pydata/xarray/issues/5654,898932809,IC_kwDOAMm_X841lKBJ,2448579,2021-08-14T17:18:56Z,2021-08-14T17:19:04Z,MEMBER,"This looks like dask. ```python __________________________________ test_chunk __________________________________ @requires_dask def test_chunk(): s = sparse.COO.from_numpy(np.array([0, 0, 1, 2])) a = DataArray(s) ac = a.chunk(2) assert ac.chunks == ((2, 2),) assert isinstance(ac.data._meta, sparse.COO) > assert_identical(ac, a) self = other = def func(self, other): if _disables_array_ufunc(other): return NotImplemented > return ufunc(other, self) E TypeError: operand type(s) all returned NotImplemented from __array_ufunc__(, '__call__', , ): 'curry', 'COO' ``` cc @jrbourbeau ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-898901645,https://api.github.com/repos/pydata/xarray/issues/5654,898901645,IC_kwDOAMm_X841lCaN,14371165,2021-08-14T14:31:22Z,2021-08-14T14:31:22Z,MEMBER,"This is showing up in the normal CI now, see https://github.com/pydata/xarray/pull/5667/checks?check_run_id=3329247566","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705 https://github.com/pydata/xarray/issues/5654#issuecomment-890406358,https://api.github.com/repos/pydata/xarray/issues/5654,890406358,IC_kwDOAMm_X841EoXW,14808389,2021-07-31T21:35:09Z,2021-07-31T21:35:09Z,MEMBER,"this seems to be caused by changes to either `dask` or `sparse`, not sure which.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,957131705