ugh, don't use os

This commit is contained in:
George Hotz
2023-01-25 19:41:21 -08:00
parent b1dec64815
commit 60acb2641f

View File

@@ -64,9 +64,9 @@ class ZeroView:
def expr_node(self, valid, idx):
expr, acc = [valid] if valid is not None else [], 1
for os,ns,(x,y) in list(zip(self.old_shape, self.shape, self.arg))[::-1]:
for s,ns,(x,y) in list(zip(self.old_shape, self.shape, self.arg))[::-1]:
base = ((idx//acc) % ns) + x
expr += ([base >= 0] if x < 0 else []) + ([base < os] if y > os else [])
expr += ([base >= 0] if x < 0 else []) + ([base < s] if y > s else [])
acc *= ns
return Variable.ands(expr)