MCPcopy Create free account
hub / github.com/dask/dask / transpose

Method transpose

dask/array/core.py:2204–2223  ·  view source on GitHub ↗

Reverse or permute the axes of an array. Return the modified array. Refer to :func:`dask.array.transpose` for full documentation. See Also -------- dask.array.transpose : equivalent function

(self, *axes)

Source from the content-addressed store, hash-verified

2202 return self.transpose()
2203
2204 def transpose(self, *axes):
2205 """Reverse or permute the axes of an array. Return the modified array.
2206
2207 Refer to :func:`dask.array.transpose` for full documentation.
2208
2209 See Also
2210 --------
2211 dask.array.transpose : equivalent function
2212 """
2213 from dask.array.routines import transpose
2214
2215 if not axes:
2216 axes = None
2217 elif len(axes) == 1 and isinstance(axes[0], Iterable):
2218 axes = axes[0]
2219 if (axes == tuple(range(self.ndim))) or (axes == tuple(range(-self.ndim, 0))):
2220 # no transpose necessary
2221 return self
2222 else:
2223 return transpose(self, axes=axes)
2224
2225 def ravel(self):
2226 """Return a flattened array.

Callers 8

apply_gufuncFunction · 0.95
TMethod · 0.95
_cov_corr_combineFunction · 0.45
test_blockwise_cullFunction · 0.45
moveaxisFunction · 0.45
rollaxisFunction · 0.45
_tensordotFunction · 0.45

Calls 1

transposeFunction · 0.90

Tested by 1

test_blockwise_cullFunction · 0.36