MCPcopy
hub / github.com/tinygrad/tinygrad / view

Method view

tinygrad/mixin/movement.py:256–258  ·  view source on GitHub ↗

`.view` is an alias for `.reshape`.

(self, shape, *args)

Source from the content-addressed store, hash-verified

254 return self._mop(Ops.PAD, tuple([(0, 0 if ns is None else ns-s) for s,ns in zip(self.shape, argfix(shape, *args), strict=True)]))
255
256 def view(self, shape, *args) -> Self:
257 """`.view` is an alias for `.reshape`."""
258 return self.reshape(shape, *args)
259
260 def squeeze(self, dim: int | None = None) -> Self:
261 """

Callers 2

exec_viewFunction · 0.45
bufferMethod · 0.45

Calls 1

reshapeMethod · 0.95

Tested by

no test coverage detected