<commit_before><commit_msg>Central location for typecast methods.<commit_after>"""Standard typecasts for Nengo on SpiNNaker."""
import rig.type_casts as tp


value_to_fix = tp.float_to_fix(True, 32, 15)  # S16.15
fix_to_value = tp.fix_to_float(True, 32, 15)

np_to_fix = tp.NumpyFloatToFixConverter(True, 32, 15)  # S16.15
# fix_to_np = tp.NumpyFixToFloatConverter(True, 15)

{'fraction_non_alphanumeric': 0.11466666666666667, 'fraction_numerical': 0.058666666666666666, 'mean_word_length': 6.09433962264151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '4210431', 'n_tokens_mistral': 166, 'n_tokens_neox': 147, 'n_words': 31}