def transpose(a, axes=None): """transpose(a, axes=None): Permute the axes of an array. By default, they are reversed. In a 2D array this would swap 'rows' and 'columns' """ if axes is None: return a.transpose() return ndarray(NDMatrix.transpose(a.nda, axes))
def transpose(self): """Compute transposed array, i.e. swap 'rows' and 'columns'""" return ndarray(NDMatrix.transpose(self.nda))