add matrix transpose in python