Skip to content

Commit 5bf3e14

Browse files
committed
perf(call): use bytes as gmm cache key
1 parent e1a401e commit 5bf3e14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strkit/call/allele.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def call_alleles(
266266
gmm_cache = {}
267267

268268
def _get_fitted_gmm(s: Union[NDArray[np.int_], NDArray[np.float_]]) -> Optional[object]:
269-
if (s_t := tuple(s)) not in gmm_cache:
269+
if (s_t := s.tobytes()) not in gmm_cache:
270270
# Fit Gaussian mixture model to the resampled data
271271
gmm_cache[s_t] = fit_gmm(rng, s, n_alleles, allele_filter, params.hq, gm_filter_factor)
272272

0 commit comments

Comments
 (0)