Re: [Tutor] Fitting data to error function

2015-03-13 Thread Danny Yoo
On Fri, Mar 13, 2015 at 11:00 AM, Danny Yoo wrote: >> The error I am recieving is as follows: >> >> TypeError: only length-1 arrays can be converted to Python scalars > > > Hi Colin, > > Do you have a more informative "stack trace" of the entire error? > Providing this will help localize the probl

Re: [Tutor] Rearranging a list of numbers with corresponding index (RESOLVED)

2015-03-13 Thread Matthew Ruffalo
On 03/13/2015 11:55 AM, Ken G. wrote: > I will be studying this also. I am still using Python 2.7.6 as that is > the latest as provided by Ubuntu 14.04.1. FYI, Python 3.4 is installed by default in Ubuntu 14.04(.1). You have to invoke it as 'python3' though. MMR... __

Re: [Tutor] Fitting data to error function

2015-03-13 Thread Danny Yoo
> The error I am recieving is as follows: > > TypeError: only length-1 arrays can be converted to Python scalars Hi Colin, Do you have a more informative "stack trace" of the entire error? Providing this will help localize the problem. As is, it's clear there's a type error... somewhere... :P

Re: [Tutor] Ipython Queries

2015-03-13 Thread Albert-Jan Roskam
- Original Message - > From: Santosh Kumar > To: python mail list > Cc: > Sent: Friday, March 13, 2015 6:09 PM > Subject: [Tutor] Ipython Queries > > Hi All, > > I have installed both python2 and python3 in my system . When i used > ipython it by default goes to python2 base. How/w

[Tutor] Ipython Queries

2015-03-13 Thread Santosh Kumar
Hi All, I have installed both python2 and python3 in my system . When i used ipython it by default goes to python2 base. How/what is the easy way to swith between python2 and python3 ? Thanks, santosh ___ Tutor maillist - Tutor@python.org To unsubscri

[Tutor] Fitting data to error function

2015-03-13 Thread Colin Ross
Hi all, I am attempting to optimize the parameters I_0 and w_0 in the function (func(x,I_0,w_0) shown below) to fit a set of data. However when I run this code I recieve the error shown below. Any suggestions would be greatly appreciated. Code: import numpy as np import math from math import *

Re: [Tutor] Rearranging a list of numbers with corresponding index (RESOLVED)

2015-03-13 Thread Ken G.
On 03/13/2015 10:38 AM, Dave Angel wrote: On 03/13/2015 09:57 AM, Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 pl

Re: [Tutor] Idle - ImportError: No module named numpy

2015-03-13 Thread Oscar Benjamin
On 11 March 2015 at 19:43, Markos wrote: > > On 10-03-2015 16:48, Oscar Benjamin wrote: >> >> Looks like a bug in pip or in the get-pip script. What version of >> python3 are you using? > > But the command to install numpy gave an error message: > > # python3 -m pip install numpy > > Collecting nu

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Ken G.
On 03/13/2015 10:21 AM, Peter Otten wrote: Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The leng

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Dave Angel
On 03/13/2015 09:57 AM, Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The length of my lists range fr

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Peter Otten
Ken G. wrote: > I have been keeping track of numbers drawn in our local lotto drawings > into a list format as shown in a short example below. Using such list, I > am able to determine how often a number appears within the last 100 plus > drawings. > > The length of my lists range from 5, 15, 35,

[Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Ken G.
I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The length of my lists range from 5, 15, 35, 59and 75 long. I will