# How to inverse a matrix using NumPy in Python # Python program to inverse# a matrix using numpy  # Import required packageimport numpy as np  # Taking a 3 * 3 matrixA = np.array([[6, 1, 1],              [4, -2, 5],              [2, 8, 7]])  # Calculating the inverse of the matrixprint(np.linalg.inv(A))