Skip to content

Commit

Permalink
fixed bug in storage of categorical annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Nov 28, 2017
1 parent 8caff85 commit 905479d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anndata/anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def df_to_records_fixed_width(df):
c = df[k].astype('category')
# transform to category only if there are less categories than
# samples
if len(c.cat.codes) < len(c):
if len(c.cat.categories) < len(c):
uns[k + '_categories'] = c.cat.categories.values
arrays.append(c.cat.codes)
else:
Expand Down

0 comments on commit 905479d

Please sign in to comment.