MCPcopy
hub / github.com/tinygrad/tinygrad / test_stack_max

Method test_stack_max

test/backend/test_ops.py:2864–2865  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2862 np.testing.assert_allclose(Tensor.stack(a, a).numpy(), Tensor([3.14, 3.14]).numpy())
2863
2864 def test_stack_max(self):
2865 helper_test_op(None, lambda x, y: torch.stack((x, y)).max(axis=0)[0], lambda x, y: Tensor.stack(x, y).max(axis=0), vals=[[1.], [2.]])
2866
2867 def test_repeat(self):
2868 x = Tensor.randn(4, 6, 3)

Callers

nothing calls this directly

Calls 3

helper_test_opFunction · 0.85
stackMethod · 0.80
maxMethod · 0.45

Tested by

no test coverage detected