# Calculate the sum of the diagonal elements of a NumPy array in Python # importing Numpy packageimport numpy as np  # creating a 3X3 Numpy matrixn_array = np.array([[55, 25, 15],                    [30, 44, 2],                    [11, 45, 77]])  # Displaying the Matrixprint("Numpy Matrix is:")print(n_array)  # calculating the Trace of a matrixtrace = np.trace(n_array)    print("\nTrace of given 3X3 matrix:")print(trace)