Re: Creating a Simple User Interface for a Function

2013-07-25 Thread CTSB01
On Thursday, July 25, 2013 3:19:27 PM UTC-4, Dave Angel wrote: > On 07/25/2013 12:03 PM, CTSB01 wrote: > > > I have the following code that runs perfectly: > > > > def psi_j(x, j): > > >rtn = [] > > >for n2 in range(0, l

Creating a Simple User Interface for a Function

2013-07-25 Thread CTSB01
I have the following code that runs perfectly: def psi_j(x, j): rtn = [] for n2 in range(0, len(x) * j - 2): n = n2 / j r = n2 - n * j rtn.append(j * x[n] + r * (x[n + 1] - x[n])) print 'n2 =', n2, ': n =', n, ' r =' , r, '

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 10:43:11 PM UTC-4, Dave Angel wrote: > On 07/18/2013 10:16 PM, CTSB01 wrote: > > Does something like > > > > > > def phi_m(x, m): > > >rtn = [] > > >for n2 in range(0, len(x) * m - 2): > > &

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 10:48:23 PM UTC-4, Fábio Santos wrote: > On 19 Jul 2013 03:24, "CTSB01" wrote: > > > > > > Thanks for the alternative links, I'll use gmane.org as an access point > > next time. > > > > > > > > &

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
Thanks for the alternative links, I'll use gmane.org as an access point next time. > > Don't paraphrase. Just copy/paste it into your email message. And I'm > > assuming you know to run things from the terminal window, and not from > > IDLE or something else that messes up the error messag

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
> It's only obvious if you're using Python 3.x. You have forgotten the > > parentheses in the call to the print() function. > > > On the other hand, if this is Python 2.x, I have no idea. Next time, > > please paste the actual error, not paraphrased. The error message > > includes a tra

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 7:45:49 PM UTC-4, Ian wrote: > On Thu, Jul 18, 2013 at 5:42 PM, Ian Kelly wrote: > > > On Thu, Jul 18, 2013 at 5:04 PM, CTSB01 wrote: > > >> Thanks Ian. That worked regarding that issue. Now I have an 'invalid >

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 6:49:03 PM UTC-4, Ian wrote: > On Jul 18, 2013 4:23 PM, "CTSB01" wrote: > > > > > >   File "", line 2 > > >     ...   rtn = [] > > >     ^ > > The "..." is the continuation prompt from the i

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 6:12:52 PM UTC-4, Gary Herron wrote: > On 07/18/2013 02:57 PM, CTSB01 wrote: > > > On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote: > > >> On 18 July 2013 00:58, CTSB01 wrote: > > >> > > >>> Pleas

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread CTSB01
On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote: > On 18 July 2013 00:58, CTSB01 wrote: > > > Please let me know if this is unclear. I will certainly continue revising > > until it makes sense to those reading. > > > > Can you summarize what

Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-17 Thread CTSB01
I've been puzzling over how to get a certain function working in Python. The function, takes positive integers to other positive integers as follows: Phi_m(n2) = Phi_m(m*n + r) = m*x[n1] + r*(x[n1 + 1] - x[n1]) The above terms are all integer valued and are defined as follows: n2 = the