Source

pypy / pypy / module / micronumpy / support.py

The default branch has multiple heads

1
2
3
4
5
6
7
8
9
from pypy.rlib import jit


@jit.look_inside_iff(lambda s: jit.isconstant(len(s)))
def product(s):
    i = 1
    for x in s:
        i *= x
    return i