Python Numpy Sum Array Php Functions Sql