Example #1
0
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))
Example #2
0
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))
Example #3
0
 def transpose(self):
     """Compute transposed array, i.e. swap 'rows' and 'columns'"""
     return ndarray(NDMatrix.transpose(self.nda))
Example #4
0
 def transpose(self):
     """Compute transposed array, i.e. swap 'rows' and 'columns'"""
     return ndarray(NDMatrix.transpose(self.nda))