<jupyter_start><jupyter_text>Subsetting<jupyter_code>weights_np
weights_np[0]
weights_np[-1]
weights_np[0:3]
weights_np[-3:-1]<jupyter_output><empty_output><jupyter_text>Comparisons<jupyter_code>a = np.array([1,2,3,4,5])
b = np.array([5,6,3,2,2])
a
b
a > b
a == b
a <= b
a != b
a
a < 5<jupyter_output><empty_output><jupyter_text>Logical indexing<jupyter_code>a
a < 5
a[0:4]
a[a<5]
a == b
a[a==b]
b[a==b]
a<b
b[a<b]
b
a<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19642857142857142, 'fraction_numerical': 0.046875, 'mean_word_length': 8.354166666666666, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 14, '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': '217382', 'license': 'MIT', 'n_tokens_mistral': 245, 'n_tokens_neox': 241, 'n_words': 34, 'path': '3.1_numpy_1D.ipynb', 'repo_name': 'butayama/Learning-Python-for-Data-Science', 'size': '448'}