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


Groups > comp.lang.python > #54398

Re: linregress and polyfit

Path csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'argument': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'element,': 0.16; 'function?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'tuple.': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'tells': 0.24; 'header:X-Complaints- To:1': 0.27; 'tried': 0.27; 'page.': 0.31; 'checked': 0.32; 'checking': 0.33; 'but': 0.35; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'according': 0.40; 'helps': 0.61; 'length': 0.61; 'simply': 0.61; 'first': 0.61; 'url:reference': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: linregress and polyfit
Date Wed, 18 Sep 2013 19:57:26 +0000 (UTC)
References <73ee6fa3-baa6-4178-8596-5f88bbd0bfa2@googlegroups.com> <f1b29ea6-b4db-4636-8042-7c531ed8e99a@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 174.32.174.35
User-Agent XPN/1.2.6 (Street Spirit ; Linux)
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.133.1379534267.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1379534267 news.xs4all.nl 15963 [2001:888:2000:d::a6]:60072
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:54398

Show key headers only | View raw


On 18/9/2013 09:38, chitturk@uah.edu wrote:

> Thanks - that helps ... but it is puzzling because
>
> np.random.normal(0.0,1.0,1) returns exactly one 
> and when I checked the length of "z", I get 21 (as before) ... 
>
>

I don't use Numpy, so this is just a guess, plus reading one web page.

According to:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html

the 3rd argument to normal should be a tuple.  So if you want a single
element, you should have made it (1,)

As for checking the 'length of "z"' did you just use the len() function?
That just tells you the first dimension.  Have you tried simply printing
out "z" ?

-- 
DaveA

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


Thread

linregress and polyfit Krishnan <chitturk@uah.edu> - 2013-09-17 19:34 -0700
  Re: linregress and polyfit Josef Pktd <josef.pktd@gmail.com> - 2013-09-17 21:25 -0700
  Re: linregress and polyfit chitturk@uah.edu - 2013-09-18 06:38 -0700
    Re: linregress and polyfit Dave Angel <davea@davea.name> - 2013-09-18 19:57 +0000
    Re: linregress and polyfit Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-19 15:37 +0100
  Re: linregress and polyfit chitturk@uah.edu - 2013-09-19 04:32 -0700

csiph-web