MCPcopy
hub / github.com/tinygrad/tinygrad / test_repeat_negative

Method test_repeat_negative

test/backend/test_edgecases.py:119–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117
118 @unittest.expectedFailure
119 def test_repeat_negative(self):
120 # repeating with a negative value should error like PyTorch
121 with self.assertRaises(RuntimeError):
122 torch.tensor([1, 2, 3]).repeat(-1, 2)
123 with self.assertRaises(RuntimeError):
124 Tensor([1, 2, 3]).repeat(-1, 2)
125
126 def test_negative_weight_decay(self):
127 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
repeatMethod · 0.80
tensorMethod · 0.80

Tested by

no test coverage detected