dct: simplify usage of numpy.dot
dct/Tt: use scalar in diag()