Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news1.as3257.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '"from': 0.16; 'kern': 0.16; 'numpy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:when': 0.16; 'underlying': 0.16; 'wow,': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'seems': 0.21; 'import': 0.22; 'header:User-Agent:1': 0.23; '"you': 0.24; 'interpret': 0.24; 'least': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'subject:) ': 0.29; 'robert': 0.30; 'that.': 0.31; 'there.': 0.32; 'option': 0.32; 'worked': 0.33; 'subject:from': 0.34; 'there': 0.35; 'to:addr:python-list': 0.38; 'realize': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'skip:n 10': 0.64; 'our': 0.64; 'world': 0.66; 'believe': 0.68; 'subject:get': 0.81; 'confusing': 0.84; 'eco': 0.84; 'terrible': 0.84; 'notebook': 0.96 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: ? get negative from prod(x) when x is positive integers Date: Fri, 28 Jun 2013 17:19:15 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 213.1.240.226 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372436407 news.xs4all.nl 15867 [2001:888:2000:d::a6]:58146 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49383 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