Skip to content

Commit 4730667

Browse files
committed
numpy issue fix for one line
1 parent 50705b3 commit 4730667

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/scanpy/metrics/_metrics.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ def confusion_matrix(
6060
orig, new = pd.Series(orig), pd.Series(new)
6161
assert len(orig) == len(new)
6262

63-
unique_labels = pd.unique(
64-
np.concatenate((np.asarray(orig.values), np.asarray(new.values)))
65-
)
63+
unique_labels = pd.unique(np.concatenate((orig.to_numpy(), new.to_numpy())))
6664

6765
# Compute
6866
mtx = _confusion_matrix(orig, new, labels=unique_labels)

0 commit comments

Comments
 (0)