Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Commit 3ef8009

Browse files
committed
Correct docstring
1 parent 776931d commit 3ef8009

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clusx/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def to_numpy(embedding: EmbeddingTensor) -> NDArray[np.float32]:
2121
"""
2222
Convert a tensor to a numpy array.
2323
24-
This function uses duck typing to detect PyTorch tensors by checking for
25-
the presence of the `detach()` method.
24+
If embedding is already a numpy array (or compatible), it is returned as is.
25+
Otherwise, it is converted to a numpy array.
2626
2727
Parameters
2828
----------

0 commit comments

Comments
 (0)