Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49383 > unrolled thread

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

Started byRobert Kern <robert.kern@gmail.com>
First post2013-06-28 17:19 +0100
Last post2013-06-28 17:19 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: ? get negative from prod(x) when x is positive integers Robert Kern <robert.kern@gmail.com> - 2013-06-28 17:19 +0100

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

FromRobert Kern <robert.kern@gmail.com>
Date2013-06-28 17:19 +0100
SubjectRe: ? get negative from prod(x) when x is positive integers
Message-ID<mailman.3965.1372436407.3114.python-list@python.org>
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" in my code. The
> seems to be a result of using ipython, or at least how I am using it "ipython
> notebook --pylab inline".

The --pylab option will do the following import:

   from matplotlib.pyplot import *

That includes a "from numpy import *" in there.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web