Interpolation of matrix interpolations

import numpy as np def lerp(A, B, alpha): return A * (1 - alpha) + B * alpha; A = np.array([ [3,7,12,15], [4,6,2,11], [3,1,7,11], [6,5,13,6] ]) B = np.array([ [11,14,16,5], [3,10,6,8], [6,12,4,9], [5,10,6,8] ]) C = np.array([ [6,6,8,8], [4,9,3,5], [14,7,10,5], [13,6,8,4] ]) D = np.array([ [5,6,9,11], [6,8,10,6], [7,9,7,6], [9,11,7,5] ]) for i in range(11): lerp_res1 = lerp(A, B, 0.1*i) lerp_res2 = lerp(C, D, 1 - 0.1*i) lerp_res = lerp(lerp_res1, lerp_res2, 0.5) print(lerp_res)