MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / test_where

Method test_where

test/null/test_gradient.py:63–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 def test_big_add_sin(self): self._test_two_input_function(lambda x,y: x.sin()+3.0/y)
62 def test_big_chain(self): self._test_two_input_function(lambda x,y: (1.0/x*y)+x*y)
63 def test_where(self): self._test_two_input_function(lambda x,y: (x<y).where(x,y), lambda x,y: torch.where(x<y,x,y))
64
65class TestRealizeMeansRealize(unittest.TestCase):
66 def test_randn_realizes(self):

Callers

nothing calls this directly

Calls 2

whereMethod · 0.45

Tested by

no test coverage detected