Skip to content

Commit

Permalink
Allow Range indices
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed May 25, 2018
1 parent 11ca8f3 commit 6a6f13e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion anndata/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ def _fix_shapes(X):


def _normalize_index(index, names):
assert names.dtype != float and names.dtype != int, 'Don’t call _normalize_index with non-categorical/string names'
if not isinstance(names, RangeIndex):
assert names.dtype != float and names.dtype != int, \
'Don’t call _normalize_index with non-categorical/string names'

# the following is insanely slow for sequences, we replaced it using pandas below
def name_idx(i):
if isinstance(i, str):
Expand Down

0 comments on commit 6a6f13e

Please sign in to comment.