1
0
Fork 0

TestZeroViewShapeTracker fix test (#481)

* TestZeroViewST test

* updated to align with st naming conventions in file

* Update test_shapetracker.py
pull/539/head
Jared Z 2023-02-07 06:17:55 -06:00 committed by GitHub
parent c073271f20
commit 7604b17fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
import unittest
import numpy as np
from tinygrad.helpers import prod
from tinygrad.shape import ShapeTracker
from tinygrad.shape import ShapeTracker, ZeroView
class DumbShapeTracker:
def __init__(self, shape):
@ -41,8 +41,8 @@ class TestZeroViewShapeTracker(unittest.TestCase):
self.st = ShapeTracker((4, 4))
self.st.pad((1, 1), (1, 1))
assert self.st.shape == (6,6)
print(self.st)
print(self.st.expr())
compareZv = ZeroView((4,4), ((-1,5), (-1,5)))
assert self.st.views[1].expr == compareZv.expr
class TestComplexShapeTracker(unittest.TestCase):
def test_add_1s(self):