def zca_whitening(inputs):
    sigma = np.dot(inputs, inputs.T) / inputs.shape[1]
U, S, V = np.linalg.svd(sigma)
epsilon = 0.1
ZCAMatrix = np.dot(np.dot(U, np.diag(1.0 / np.sqrt(np.diag(S) + epsilon))), U.T
    )
return np.dot(ZCAMatrix, inputs)
How to implement ZCA Whitening? Python