MCPcopy Create free account
hub / github.com/cupy/cupy / change_mode

Method change_mode

cupyx/distributed/array/_array.py:310–320  ·  view source on GitHub ↗

Return a view or a copy in the given mode. Args: mode (mode Object): How overlaps of the chunks are interpreted. .. seealso:: :attr:`DistributedArray.mode` for details about modes.

(self, mode: _modes.Mode)

Source from the content-addressed store, hash-verified

308 self.shape, self.dtype, chunks_map, op_mode, self._comms)
309
310 def change_mode(self, mode: _modes.Mode) -> DistributedArray:
311 """Return a view or a copy in the given mode.
312
313 Args:
314 mode (mode Object): How overlaps of
315 the chunks are interpreted.
316
317 .. seealso::
318 :attr:`DistributedArray.mode` for details about modes.
319 """
320 return self._to_op_mode(mode)
321
322 def reshard(self, index_map: dict[int, Any]) -> DistributedArray:
323 """Return a view or a copy having the given index_map.

Callers 4

distributed_arrayFunction · 0.80

Calls 1

_to_op_modeMethod · 0.95