<jupyter_start><jupyter_text>Load all imgs inside list<jupyter_code>l = [PILImage.create(f) for f in images]
l2 = [np.asarray(PILImage.create(f)) for f in images]<jupyter_output><empty_output><jupyter_text>time with PIL<jupyter_code>%%time
imagesPILGray = [x.convert('LA').convert('RGB') for x in l]<jupyter_output>CPU times: user 14.3 ms, sys: 3.85 ms, total: 18.2 ms
Wall time: 15.7 ms<jupyter_text>time with taichi<jupyter_code>%%time
imagesTaichiGray = []
for img in l2:
    gray_scale(img, 20)
    imagesTaichiGray.append(img)
PILImage.create(imagesTaichiGray[0])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1354515050167224, 'fraction_numerical': 0.028428093645484948, 'mean_word_length': 7.205479452054795, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '531273', 'license': 'Apache-2.0', 'n_tokens_mistral': 260, 'n_tokens_neox': 242, 'n_words': 49, 'path': '__explorations__/taichi as img manipulation.ipynb', 'repo_name': 'tyoc213/blog', 'size': '598'}