we usually write

from scipy import linalg
linalg.inv(...)