all_setup = """ import numpy as np ; from scipy.linalg import sqrtm ; from numpy.linalg import inv ; from numpy import sqrt
  a=.1 ; c=43.2 ; d=32.343"""
timeit('sqrtm(inv(np.array([ ( a, 0, 0 ) , ( c, d, 0 ) , ( 0, 0, 1 ) ])))',
    setup=all_setup, number=num_to_run)
Efficient way to plotting multiple images with many patches in matplotlib?