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-909333730,https://api.github.com/repos/pydata/xarray/issues/5654,909333730,IC_kwDOAMm_X842M1Ti,11656932,2021-08-31T15:17:44Z,2021-08-31T15:17:44Z,CONTRIBUTOR,"This should be closed via https://github.com/pydata/xarray/pull/5751. Again, thanks all for your efforts! ","{""total_count"": 4, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,957131705 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-908582707,https://api.github.com/repos/pydata/xarray/issues/5654,908582707,IC_kwDOAMm_X842J98z,3019665,2021-08-30T18:28:27Z,2021-08-30T18:28:27Z,NONE,Thanks Hameer! 😄,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""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-906689573,https://api.github.com/repos/pydata/xarray/issues/5654,906689573,IC_kwDOAMm_X842Cvwl,11656932,2021-08-26T19:38:37Z,2021-08-26T19:38:37Z,CONTRIBUTOR,"Thanks for hunting all this down @crusaderky, I'm currently grokking it. Also cc @hameerabbasi for visibility ","{""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-906684668,https://api.github.com/repos/pydata/xarray/issues/5654,906684668,IC_kwDOAMm_X842Cuj8,3019665,2021-08-26T19:30:53Z,2021-08-26T19:30:53Z,NONE,cc @pentschev (just so you are aware),"{""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-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-906631637,https://api.github.com/repos/pydata/xarray/issues/5654,906631637,IC_kwDOAMm_X842ChnV,11656932,2021-08-26T18:12:01Z,2021-08-26T18:12:01Z,CONTRIBUTOR,"Hrm, looking at the [API docs for `sparse.zeros_like`](https://sparse.pydata.org/en/stable/generated/sparse.zeros_like.html), it appears to support `shape=` ```python In [1]: import sparse In [2]: sparse.__version__ Out[2]: '0.12.0' In [3]: import numpy as np In [4]: x = np.arange(6) In [5]: y = sparse.zeros_like(x, shape=(3, 2)) In [6]: y Out[6]: In [7]: y.todense() Out[7]: array([[0, 0], [0, 0], [0, 0]]) ```","{""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-905592839,https://api.github.com/repos/pydata/xarray/issues/5654,905592839,IC_kwDOAMm_X841-kAH,11656932,2021-08-25T15:10:10Z,2021-08-25T15:10:10Z,CONTRIBUTOR,Also cc @crusaderky if you get a chance to look into this ,"{""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-903169462,https://api.github.com/repos/pydata/xarray/issues/5654,903169462,IC_kwDOAMm_X8411UW2,3019665,2021-08-21T19:59:40Z,2021-08-21T19:59:40Z,NONE,Yeah was just mentioning that since we had older version of `sparse` pulled while developing that PR at one point and it caused issues. Sounds like that is not the case here,"{""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-903022152,https://api.github.com/repos/pydata/xarray/issues/5654,903022152,IC_kwDOAMm_X8410wZI,11656932,2021-08-21T00:30:11Z,2021-08-21T00:30:11Z,CONTRIBUTOR,"Good point. CI is currently pulling in the latest `sparse=0.12.0` release (which is also what I'm running locally). It also appears there were some ordering concerns related to https://github.com/dask/dask/issues/5259 when `test_chunk` was added (xref https://github.com/pydata/xarray/pull/3202#discussion_r313098400) ","{""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-903015237,https://api.github.com/repos/pydata/xarray/issues/5654,903015237,IC_kwDOAMm_X8410utF,3019665,2021-08-21T00:05:35Z,2021-08-21T00:09:08Z,NONE,"Would double check that CI is pulling the latest `sparse` xref: https://github.com/dask/dask/pull/7939#issuecomment-887122942","{""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-903005031,https://api.github.com/repos/pydata/xarray/issues/5654,903005031,IC_kwDOAMm_X8410sNn,11656932,2021-08-20T23:22:35Z,2021-08-20T23:23:28Z,CONTRIBUTOR,"Ah, that's a good point @keewis. Stepping back a bit, my current situation locally is I'm able to reproduce the `xarray/tests/test_sparse.py::test_chunk` failure with: - the latest commit to `dask` (https://github.com/dask/dask/commit/76822dbc3da29767d7e6d70d73010046bd52604e) - the latest commit to `xarray` (https://github.com/pydata/xarray/commit/e26aec9500e04f3b926b248988b976dbfcb9c632) - `numpy=1.21.1` - `pandas=1.3.1` Rolling `dask` back to the 2021.7.2 release, but keeping everything else the same, `test_chunk` passes. After running `git bisect` between the latest `dask` commit and the 2021.7.2 release, https://github.com/dask/dask/pull/7939 is the point where `test_chunk` started failing (cc @jakirkham for visibility). I'll try to dig in a bit more to see if I can find the root cause of the failure EDIT: I should note that the `test_chunk` failure has a similar traceback to https://github.com/dask/dask/issues/5259","{""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-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-899855458,https://api.github.com/repos/pydata/xarray/issues/5654,899855458,IC_kwDOAMm_X841orRi,11656932,2021-08-16T22:20:00Z,2021-08-16T22:35:59Z,CONTRIBUTOR,"Thanks for the ping @dcherian. Running against Dask's `git` history, https://github.com/dask/dask/pull/7939 is the place where `xarray/tests/test_sparse.py::test_chunk` started failing. We probably dropped some relevant compatibility code when we stopped supporting NumPy 1.17 and pandas 0.25. Since `xarray` has a [clearly defined policy for minimum dependencies](http://xarray.pydata.org/en/stable/getting-started-guide/installing.html#minimum-dependency-versions), would dropping NumPy 1.17 and pandas 0.25 be an acceptable solution here? ","{""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