Skip to content

Commit

Permalink
Correct serie's dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
michalk8 committed Nov 2, 2023
1 parent fcc8114 commit 81ac67b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cellrank/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def _convert_to_categorical_series(
"that there are no conflicting keys, such as `0` and `'0'`."
)

term_states = pd.Series([np.nan] * len(cell_names), index=cell_names)
term_states = pd.Series([None] * len(cell_names), index=cell_names, dtype=str)
for ts, cells in mapper.items():
term_states[cells] = ts

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def test_compare_fate_probabilities_with_reference(self):

c = cr.estimators.CFLARE(cr.kernels.PrecomputedKernel(transition_matrix))

state_annotation = pd.Series(index=range(len(c)))
state_annotation = pd.Series(index=range(len(c)), dtype=str)
state_annotation[7] = "terminal_1"
state_annotation[10] = "terminal_2"
state_annotation = state_annotation.astype("category")
Expand Down

0 comments on commit 81ac67b

Please sign in to comment.