<jupyter_start><jupyter_text>Rearranging Array Elements<jupyter_code>import numpy as np
my_start_array = np.array(np.arange(24))
my_3_8_array = my_start_array.reshape((3,8))
my_2_3_4_array = my_3_8_array.reshape((2,3,4))<jupyter_output><empty_output><jupyter_text>fliplr "flip left right"from: http://docs.scipy.org/doc/numpy/reference/generated/numpy.fliplr.htmlnumpy.fliplrFlip array in the left/right direction.<jupyter_code>my_3_8_array
np.fliplr(my_3_8_array)
my_2_3_4_array
np.fliplr(my_2_3_4_array)
np.flipud(my_3_8_array)
np.flipud(my_2_3_4_array)
my_start_array

np.roll(my_start_array, 5)
np.roll(my_start_array, -5)
np.roll(my_2_3_4_array, 2)
np.roll(my_2_3_4_array, -2)
my_3_8_array
np.rot90(my_3_8_array)
np.rot90(my_3_8_array, k=-1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.06443298969072164, 'mean_word_length': 9.5, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '520306', 'license': 'MIT', 'n_tokens_mistral': 395, 'n_tokens_neox': 382, 'n_words': 39, 'path': 'numpy-data-science-essential-training/Ex_Files_NumPy_Data_EssT/Exercise Files/Ch 5/05_06/Finish/Rearrange.ipynb', 'repo_name': 'saint1729/in-learning', 'size': '776'}