(x:Iterable[T])
| 11 | U = TypeVar("U") |
| 12 | # NOTE: it returns int 1 if x is empty regardless of the type of x |
| 13 | def prod(x:Iterable[T]) -> T|int: return functools.reduce(operator.mul, x, 1) |
| 14 | |
| 15 | # NOTE: helpers is not allowed to import from anything else in tinygrad |
| 16 | OSX, WIN = platform.system() == "Darwin", sys.platform == "win32" |
searching dependent graphs…