Scribble notes: why I use einsum() not tensordot()
Protect debug print statement from epsilon == 0.0