implementing DCT in python