mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-07 03:00:26 -04:00
ruff cleanup (#4594)
* check editor config * no editorconfig, it doesn't work * ruff cleanups
This commit is contained in:
@@ -378,7 +378,6 @@ class TestIndexing(unittest.TestCase):
|
||||
numpy_testing_assert_equal_helper(strided[rows, columns],
|
||||
np.array([[1, 3], [11, 13]]))
|
||||
|
||||
|
||||
# setting values
|
||||
|
||||
# strided is [[10, 11],
|
||||
|
||||
@@ -25,7 +25,6 @@ def st_shape(draw) -> tuple[int, ...]:
|
||||
assume(prod([d for d in s if d]) <= 1024 ** 4)
|
||||
return s
|
||||
|
||||
|
||||
def tensors_for_shape(s:tuple[int, ...]) -> tuple[torch.tensor, Tensor]:
|
||||
x = np.arange(prod(s)).reshape(s)
|
||||
return torch.from_numpy(x), Tensor(x)
|
||||
@@ -51,7 +50,6 @@ class TestShapeOps(unittest.TestCase):
|
||||
assert len(tor) == len(ten)
|
||||
assert all([np.array_equal(tor.numpy(), ten.numpy()) for (tor, ten) in zip(tor, ten)])
|
||||
|
||||
|
||||
@settings.get_profile(__file__)
|
||||
@given(st_shape(), st_int32, st_int32)
|
||||
def test_chunk(self, s:tuple[int, ...], dim:int, num:int):
|
||||
|
||||
@@ -182,7 +182,6 @@ class TestNN(unittest.TestCase):
|
||||
np.testing.assert_allclose(gb.numpy(), torch_layer.bias.grad.numpy(), atol=5e-4, rtol=1e-5)
|
||||
np.testing.assert_allclose(gx.numpy(), torch_x.grad.numpy(), atol=5e-4, rtol=1e-5)
|
||||
|
||||
|
||||
@unittest.skipIf(CI and Device.DEFAULT == "WEBGPU", "runs out of memory in CI")
|
||||
def test_conv_transpose1d(self):
|
||||
BS, C1, W = 4, 16, 224//4
|
||||
|
||||
Reference in New Issue
Block a user