I couldn't use the sign funcion inside of another function

2012-04-23 Thread Julio Sergio
I want to use the sign function. When I use it in in-line mode works pretty well: : sign(-20) : -1 However, I wrote the following code in a file, say, pp.py def tst(x): s = sign(x) return(s) Then I tried to import into my session: : from pp import * When I try to use tst,

Re: I couldn't use the sign funcion inside of another function

2012-04-23 Thread Chris Rebert
On Mon, Apr 23, 2012 at 11:29 AM, Julio Sergio julioser...@gmail.com wrote: I want to use the sign function. When I use it in in-line mode works pretty well:   : sign(-20)   : -1 However, I wrote the following code in a file, say, pp.py def tst(x):    s = sign(x)    return(s) Then I

Re: I couldn't use the sign funcion inside of another function

2012-04-23 Thread Emile van Sebille
On 4/23/2012 11:39 AM Chris Rebert said... On Mon, Apr 23, 2012 at 11:29 AM, Julio Sergiojulioser...@gmail.com wrote: I want to use the sign function. When I use it in in-line mode works pretty well: : sign(-20) : -1 However, I wrote the following code in a file, say, pp.py def