示例#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))
示例#2
0
文件: ndarray.py 项目: ATNF/cs-studio
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))
示例#3
0
 def transpose(self):
     """Compute transposed array, i.e. swap 'rows' and 'columns'"""
     return ndarray(NDMatrix.transpose(self.nda))
示例#4
0
文件: ndarray.py 项目: ATNF/cs-studio
 def transpose(self):
     """Compute transposed array, i.e. swap 'rows' and 'columns'"""
     return ndarray(NDMatrix.transpose(self.nda))