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

Commit afe58f0

Browse files
committed
Remove no longer needed types import/declaration
1 parent a520288 commit afe58f0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clusx/clustering/utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@
1515

1616
from clusx.errors import MissingClusterColumnError, MissingParametersError
1717
from clusx.logging import get_logger
18-
from clusx.utils import to_numpy
1918

2019
if TYPE_CHECKING:
21-
from typing import Optional, Union
22-
23-
import torch
24-
from numpy.typing import NDArray
25-
26-
EmbeddingTensor = Union[torch.Tensor, NDArray[np.float32]]
20+
from typing import Optional
2721

2822

2923
logger = get_logger(__name__)
@@ -219,7 +213,7 @@ def get_embeddings(texts: list[str]) -> np.ndarray:
219213
disable=None, # Disable on non-TTY
220214
unit=" texts",
221215
):
222-
emb_array = to_numpy(dp.get_embedding(text))
216+
emb_array = np.asarray(dp.get_embedding(text))
223217
embeddings.append(emb_array)
224218

225219
return np.array(embeddings)

0 commit comments

Comments
 (0)