<jupyter_start><jupyter_text>Eigenvalues and Eigenvectors of a square array<jupyter_code>arr_shape = int(input("Enter size of square array: "))
arr = list(map(int,input("Enter a square array in row-wise manner: ").split()))

if len(arr) == arr_shape**2 :
    sq_arr = np.array(arr, dtype=int).reshape(arr_shape, arr_shape)
    print("\nSUCCESS: Reshape operation completed")
    print(f"Given square array is")
    print(sq_arr)
    
    eig_val, eig_vec = np.linalg.eig(sq_arr)
    print("The eigenvalues of the above square array is")
    print(eig_val)
    print("The eigenvectors of the above square array is")
    print(eig_vec)
else:
    print(f"ERROR: Cannot reshape array of size {len(arr)} into {(arr_shape, arr_shape)}")<jupyter_output>Enter size of square array:  2
Enter a square array in row-wise manner:  1 2 2 1
{'fraction_non_alphanumeric': 0.1162227602905569, 'fraction_numerical': 0.007263922518159807, 'mean_word_length': 4.587837837837838, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '139479', 'license': 'MIT', 'n_tokens_mistral': 296, 'n_tokens_neox': 283, 'n_words': 86, 'path': 'bits_wilp/Ex2_Numpy_Q5.ipynb', 'repo_name': 'deepak5998/Py', 'size': '826'}