Skip to content

Commit

Permalink
perf(call): use bytes as gmm cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Jun 15, 2024
1 parent e1a401e commit 5bf3e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strkit/call/allele.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def call_alleles(
gmm_cache = {}

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

Expand Down

0 comments on commit 5bf3e14

Please sign in to comment.