MCPcopy
hub / github.com/dask/dask / transpose

Method transpose

dask/array/core.py:2206–2225  ·  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

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

Callers 9

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

Calls 1

transposeFunction · 0.90

Tested by 1

test_blockwise_cullFunction · 0.36