MCPcopy
hub / github.com/tinygrad/tinygrad / consec

Function consec

test/unit/test_indexing.py:17–18  ·  view source on GitHub ↗
(shape, start=1)

Source from the content-addressed store, hash-verified

15 np.testing.assert_equal(a, b)
16
17def consec(shape, start=1):
18 return Tensor.arange(prod(shape)).reshape(shape)+start
19
20# creates strided tensor with base set to reference tensor's base, equivalent to torch.set_()
21def set_(reference: Tensor, shape, strides, offset):

Callers 3

test_indexMethod · 0.85
validate_indexingMethod · 0.85

Calls 3

prodFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…