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


Groups > comp.lang.python > #49383

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

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 <python-python-list@m.gmane.org>
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 <robert.kern@gmail.com>
Subject Re: ? get negative from prod(x) when x is positive integers
Date Fri, 28 Jun 2013 17:19:15 +0100
References <CALyJZZUcfwJGbn_UqCmsUUcv9MaimyD+vjjW+d64wVc0G0f92A@mail.gmail.com> <CAN1F8qUNFSB4XW5iZ=hBszNnYvh8CCBunTWDFWKFzc1=-xCA9A@mail.gmail.com> <CALyJZZUa1Tt8wsKwFd=3-9MX9y0ZDiXHerfVyFQaG-YRHPOSJg@mail.gmail.com>
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 <CALyJZZUa1Tt8wsKwFd=3-9MX9y0ZDiXHerfVyFQaG-YRHPOSJg@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3965.1372436407.3114.python-list@python.org> (permalink)
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

Show key headers only | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web