Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'float': 0.05; 'subject:How': 0.09; 'subject:create': 0.09; 'subject:python': 0.11; '100,': 0.16; 'received:209.85.160.42': 0.16; 'subject:array': 0.16; 'subject:random': 0.16; 'work.': 0.23; 'random': 0.24; 'tried': 0.25; 'values': 0.26; 'array': 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'does': 0.37; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'header:Reply-to:1': 0.79; 'reply-to:addr:gmail.com': 0.79; 'header:Return-Path:2': 0.84; 'ranging': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:to:from:reply-to:subject:message-id:x-priority :x-mailer:mime-version:content-type; bh=AXRRF6QNl9FGGq2hac2DJzZM3d9x98XhuGATo6tjuvo=; b=HodFgRlHmgYJEQi7IFM2QunfGwtC1grAkrl/cOxL6V91bTvlAXNpjVaacqgDdp87II mj5fqe2rsmYvA7fxstC3yOChSqhNHHajz8uhvwg9I1n7Hg4yfbTwkHt0ap3gx0Vttv9+ Shp7BPic9r2zJpBIEGk10BXRVZoXOI+ohjV9+j2Kw2VkVW3WOKo/7WArc/C3Y8RJiqgz iIUD79WmpTsVIn1JCIgrNSIf9WvzpRaOYxU1pjgUX0vvxTkmdu4SeCPiT4vhJqTBkCUL DByi2MNTygsr4Sguc89eGiZiKNB1BoiUdy8fgMTmvG9Stm0+KUbZdlVt5Tfnv3+GDhyw b5ng== X-Received: by 10.68.50.161 with SMTP id d1mr39117857pbo.30.1363108272517; Tue, 12 Mar 2013 10:11:12 -0700 (PDT) Date: Tue, 12 Mar 2013 17:11:10 +0000 To: python-list@python.org From: Norah Jones Subject: How can i create a random array of floats from 0 to 5 in python X-Priority: 3 X-Mailer: CatPHPMailer 5.1 (phpmailer.sourceforge.net) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_193b22760f1a5f69d377232fe91cdfac" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Norah Jones 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363108626 news.xs4all.nl 6851 [2001:888:2000:d::a6]:51049 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41135 --b1_193b22760f1a5f69d377232fe91cdfac Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit I want to create a random float array of size 100, with the values in the array ranging from 0 to 5. I have tried random.sample(range(5),100) but that does not work. How can i get what i want to achieve? --b1_193b22760f1a5f69d377232fe91cdfac Content-Type: text/html; charset = "iso-8859-1" Content-Transfer-Encoding: 8bit I want to create a random float array of size 100, with the values in the array ranging from 0 to 5. I have tried random.sample(range(5),100) but that does not work. How can i get what i want to achieve? --b1_193b22760f1a5f69d377232fe91cdfac--