<jupyter_start><jupyter_text>Transposition<jupyter_code>arr_01 = np.array([[10, 20, 30], [40, 50, 60]])
arr_01
arr_01.T
np.transpose(arr_01)<jupyter_output><empty_output><jupyter_text>Boradcasting<jupyter_code>arr_02 = np.array([[1, 2, 3]])
arr_02
arr_02.T
arr_02.T + arr_02<jupyter_output><empty_output><jupyter_text>Arrays to Matrices<jupyter_code>arr_03 = np.array([np.arange(1, 6), np.arange(10, 15)])
arr_03
arr_03.ravel()
arr_03.T.ravel()<jupyter_output><empty_output><jupyter_text>Logical Operators<jupyter_code>np.random.seed(100)
arr_04 = np.random.randint(1, 10, size = (4, 4))
arr_04
np.any(arr_04 % 7 == 0)
np.all(arr_04 < 11)<jupyter_output><empty_output><jupyter_text>Reshaping<jupyter_code>arr_05 = np.arange(1, 16)
arr_05
arr_05.reshape(3, 5)<jupyter_output><empty_output><jupyter_text>Ordering<jupyter_code>arr_06 = np.array([[40, 30], [20, 10]])
arr_06
arr_06.sort(axis = 1)
arr_06
arr_06.sort(axis = 0)
arr_06<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16597077244258873, 'fraction_numerical': 0.10438413361169102, 'mean_word_length': 9.538461538461538, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '392462', 'license': 'MIT', 'n_tokens_mistral': 519, 'n_tokens_neox': 453, 'n_words': 55, 'path': 'modules/01-data-manipulation/03-arrays-transposition-and-reshaping.ipynb', 'repo_name': 'cfascina/rtaps', 'size': '958'}