예제 #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))