bolt/spark/shapes.py
def transpose(self, *axes):
        """
        Transpose just the keys of a BoltArraySpark, returning a
        new BoltArraySpark.

        Parameters
        ----------
        axes : tuple
             New proposed axes.
        """
        new = argpack(axes)
        old = range(self.ndim)
        istransposeable(new, old)

        if new == old:
            return self._barray

        def f(k):
            return tuple(k[i] for i in new)

        newrdd = self._barray._rdd.map(lambda kv: (f(kv[0]), kv[1]))
        newshape = tuple(self.shape[i] for i in new) + self._barray.values.shape

        return BoltArraySpark(newrdd, shape=newshape, ordered=False).__finalize__(self._barray)
def transpose(self, *axes):
        new = argpack(axes)
        old = range(self.ndim)
        istransposeable(new, old)

        if new == old:
            return self._barray

        def f(k):
            return tuple(k[i] for i in new)

        newrdd = self._barray._rdd.map(lambda kv: (f(kv[0]), kv[1]))
        newshape = tuple(self.shape[i] for i in new) + self._barray.values.shape

        return BoltArraySpark(newrdd, shape=newshape, ordered=False).__finalize__(self._barray)
def transpose ( self , * axes ) : new = argpack ( axes ) old = range ( self . ndim ) istransposeable ( new , old ) if new == old : return self . _barray def f ( k ) : return tuple ( k [ i ] for i in new ) newrdd = self . _barray . _rdd . map ( lambda kv : ( f ( kv [ 0 ] ) , kv [ 1 ] ) ) newshape = tuple ( self . shape [ i ] for i in new ) + self . _barray . values . shape return BoltArraySpark ( newrdd , shape = newshape , ordered = False ) . __finalize__ ( self . _barray )
Transpose just the keys of a BoltArraySpark, returning a
        new BoltArraySpark.

        Parameters
        ----------
        axes : tuple
             New proposed axes.
Transpose just the keys of a BoltArraySpark returning a new BoltArraySpark .