MCPcopy
hub / github.com/MaartenGr/BERTopic / to_ndarray

Function to_ndarray

bertopic/_utils.py:202–205  ·  view source on GitHub ↗
(array: Union[np.ndarray, csr_matrix])

Source from the content-addressed store, hash-verified

200 """
201
202 def to_ndarray(array: Union[np.ndarray, csr_matrix]) -> np.ndarray:
203 if isinstance(array, csr_matrix):
204 return array.toarray()
205 return array
206
207 logger = MyLogger()
208

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected