mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
fix: else-return on runtime (#4881)
* fix: add init file * fix: no else-return * fix: remove file again
This commit is contained in:
parent
1e3325f369
commit
1785a70e77
7 changed files with 14 additions and 16 deletions
|
|
@ -17,7 +17,7 @@ def _load(m, i):
|
|||
|
||||
def load(inp, j=0):
|
||||
if len(inp) == 4: return [_load(m, x+j) if gate else default for m,x,gate,default in zip(*inp)]
|
||||
else: return [_load(m, x+j) for m,x in zip(inp[0], inp[1])]
|
||||
return [_load(m, x+j) for m,x in zip(inp[0], inp[1])]
|
||||
|
||||
def _store(m, i, v):
|
||||
if i < 0 or i >= len(m): raise IndexError(f"store out of bounds, size is {len(m)}, access is {i}, value is {v}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue