Having the dct operate row-wise is not a different syntax, it's broken. The dct is a linear transformation and linear transformations operate on columns, not on rows. (Unless you apply them to the transpose of the matrix, which is what the SciPy dct is doing.)