<jupyter_start><jupyter_text>Description Similar as `06` but with numba disabled to compare with a pure Python implementation.Here I had to reduce the number of `n_genes`, since it takes too much otherwise.  Disable numba<jupyter_code>%env NUMBA_DISABLE_JIT=1<jupyter_output>env: NUMBA_DISABLE_JIT=1<jupyter_text>Remove pycache dir<jupyter_code>!echo ${CODE_DIR}
!find ${CODE_DIR} -regex '^.*\(__pycache__\)$' -print
!find ${CODE_DIR} -regex '^.*\(__pycache__\)$' -prune -exec rm -rf {} \;
!find ${CODE_DIR} -regex '^.*\(__pycache__\)$' -print<jupyter_output><empty_output><jupyter_text>Modules<jupyter_code>import numpy as np

from clustermatch.coef import cm
# let numba compile all the code before profiling
cm(np.random.rand(10), np.random.rand(10))<jupyter_output><empty_output><jupyter_text>Data<jupyter_code>n_genes, n_samples = 50, 1000
np.random.seed(0)
data = np.random.rand(n_genes, n_samples)
data.shape<jupyter_output><empty_output><jupyter_text>Profile<jupyter_code>def func():
    n_clust = list(range(2, 10 + 1))
    return cm(data, internal_n_clusters=n_clust)
%%timeit func()
func()
%%prun -s cumulative -l 50 -T 08-cm_many_genes.txt
func()<jupyter_output>*** Profile printout saved to text file '08-cm_many_genes.txt'.
{'fraction_non_alphanumeric': 0.13823767178658045, 'fraction_numerical': 0.02021018593371059, 'mean_word_length': 6.7375, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '101819', 'license': 'BSD-2-Clause-Patent', 'n_tokens_mistral': 497, 'n_tokens_neox': 472, 'n_words': 105, 'path': 'nbs/others/05_clustermatch_profiling/11_cm_optimized/08-many_genes.ipynb', 'repo_name': 'miltondp/clustermatch-gene-expr', 'size': '1237'}