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

Method assign

test/unit/test_disk_tensor.py:329–329  ·  view source on GitHub ↗
(x,s,y)

Source from the content-addressed store, hash-verified

327
328 def test_assign_slice(self):
329 def assign(x,s,y): x[s] = y
330 helper_test_disk_tensor(self.tmp, "dt_assign_slice_1", [0,1,2,3], lambda x: assign(x, slice(0,2), [13, 12]))
331 helper_test_disk_tensor(self.tmp, "dt_assign_slice_2", [[0,1,2,3],[4,5,6,7]], lambda x: assign(x, slice(0,1), [[13, 12, 11, 10]]))
332

Calls

no outgoing calls

Tested by

no test coverage detected