Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Robert Kern
On 2013-06-28 16:26, Vincent Davis wrote: @Joshua "You are using numpy.prod()" Wow, since sum([1,2,3,4]) worked I tried prod([1,2,3,4]) and got the right answer so I just used that. Confusing that it would use numpy.prod(), I realize now there is no python prod(). At no point do I "import numpy"

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Terry Reedy
On 6/28/2013 10:38 AM, Vincent Davis wrote: I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] I am calculating the prod

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Vincent Davis
@Joshua "You are using numpy.prod()" Wow, since sum([1,2,3,4]) worked I tried prod([1,2,3,4]) and got the right answer so I just used that. Confusing that it would use numpy.prod(), I realize now there is no python prod(). At no point do I "import numpy" in my code. The seems to be a result of usin

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Joshua Landau
On 28 June 2013 15:38, Vincent Davis wrote: > I have a list of a list of integers. The lists are long so i cant really > show an actual example of on of the lists, but I know that they contain only > the integers 1,2,3,4. so for example. > s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] > > I am calculatin

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Peter Otten
Vincent Davis wrote: > I have a list of a list of integers. The lists are long so i cant really > show an actual example of on of the lists, but I know that they contain > only the integers 1,2,3,4. so for example. > s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] > > I am calculating the product, sum, ma

? get negative from prod(x) when x is positive integers

2013-06-28 Thread Vincent Davis
I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] I am calculating the product, sum, max, min of each list in s2 but