Skip to content

Commit

Permalink
Fix colors being changed by subsetting
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirshup committed May 28, 2020
1 parent 3171e7e commit d52b923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anndata/_core/anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import warnings
import collections.abc as cabc
from collections import OrderedDict
from copy import deepcopy
from copy import copy, deepcopy
from enum import Enum
from functools import singledispatch
from pathlib import Path
Expand Down Expand Up @@ -351,7 +351,7 @@ def _init_as_view(self, adata_ref: "AnnData", oidx: Index, vidx: Index):
self._varp = adata_ref.varp._view(self, vidx)
# Speical case for old neighbors, backwards compat. Remove in anndata 0.8.
uns_new = _slice_uns_sparse_matrices(
adata_ref._uns, self._oidx, adata_ref.n_obs
copy(adata_ref._uns), self._oidx, adata_ref.n_obs
)
# fix categories
self._remove_unused_categories(adata_ref.obs, obs_sub, uns_new)
Expand Down

0 comments on commit d52b923

Please sign in to comment.