def sumPrimes(n):
    b, p, sum = [True] * (n + 1), 2, 0
for p in range(2, n + 1):
    if b[p]:
        sum += p
for i in range(p, n + 1, p):
    b[i] = False
return sum
Project Euler #10 with Python, Numpy sum summing incorrectly