MCPcopy
hub / github.com/tinygrad/tinygrad / test_max_empty

Method test_max_empty

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

Source from the content-addressed store, hash-verified

77
78 @unittest.expectedFailure
79 def test_max_empty(self):
80 # Max on an empty tensor should also raise an error.
81 with self.assertRaises(RuntimeError):
82 torch.tensor([]).max()
83 with self.assertRaises(RuntimeError):
84 Tensor([]).max()
85
86 @unittest.expectedFailure
87 def test_argmax_empty(self):

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
tensorMethod · 0.80
maxMethod · 0.45

Tested by

no test coverage detected