Skip to content
forked from pydata/xarray

Commit

Permalink
clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Aug 13, 2021
1 parent 8e6c548 commit 637421d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4133,8 +4133,7 @@ def unstack(
# function requires.
# https://github.com/pydata/xarray/pull/4746#issuecomment-753282125
any(is_duck_dask_array(v.data) for v in self.variables.values())
# Sparse doesn't currently support advanced indexing
# https://github.com/pydata/sparse/issues/114
# sparse.COO doesn't currently support assignment
or any(
isinstance(v.data, sparse_array_type)
for v in self.variables.values()
Expand Down
5 changes: 0 additions & 5 deletions xarray/core/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1595,9 +1595,6 @@ def _unstack_once(

if sparse:
# unstacking a dense multitindexed array to a sparse array
# Use the sparse.COO constructor until sparse supports advanced indexing
# https://github.com/pydata/sparse/issues/114
# TODO: how do we allow different sparse array types
from sparse import COO

codes = zip(*index.codes)
Expand Down Expand Up @@ -1628,8 +1625,6 @@ def _unstack_once(
# Indexer is a list of lists of locations. Each list is the locations
# on the new dimension. This is robust to the data being sparse; in that
# case the destinations will be NaN / zero.
# sparse doesn't support item assigment,
# https://github.com/pydata/sparse/issues/114
data[(..., *indexer)] = reordered

return self._replace(dims=new_dims, data=data)
Expand Down

0 comments on commit 637421d

Please sign in to comment.