[sage-support] trying to understand the coercion model...

2009-07-01 Thread Kwankyu
Hi, I am trying to understand the coercion model... In the followiing, C is a parent that I defined, in which (I think) I implemented a coercion map from P to C, but not from ZZ to C. sage: P Multivariate Polynomial Ring in x, y over Finite Field in a of size 2^4 sage: C.has_coerce_map_from(P)

[sage-support] A little question about mod in function definition

2009-07-01 Thread Alasdair
Of these two examples: m(x)=mod(x,10) m=lambda x:mod(x,10) The first returns an error unable to convert x (=x) to an integer. Can anyone explain what's going on here? Thanks, Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to

[sage-support] Database Connection

2009-07-01 Thread Aleksey Gogolev
Hello! I need to operate on a statistical data in the sage notebook. But before I do that I need to get this data from the Oracle DB. Is there a way to get data from DB? Cann't find the answer manually :( Any help would be appreciated. --~--~-~--~~~---~--~~ To

[sage-support] Re: A little question about mod in function definition

2009-07-01 Thread Kwankyu
You should define a Python function def m(x): return mod(x,10) Kwankyu --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more

[sage-support] Re: Database Connection

2009-07-01 Thread Robert Bradshaw
On Jul 1, 2009, at 1:47 AM, Aleksey Gogolev wrote: Hello! I need to operate on a statistical data in the sage notebook. But before I do that I need to get this data from the Oracle DB. Is there a way to get data from DB? Cann't find the answer manually :( Any help would be appreciated.

[sage-support] Re: trying to understand the coercion model...

2009-07-01 Thread Robert Bradshaw
On Jul 1, 2009, at 1:22 AM, Kwankyu wrote: Hi, I am trying to understand the coercion model... In the followiing, C is a parent that I defined, in which (I think) I implemented a coercion map from P to C, but not from ZZ to C. sage: P Multivariate Polynomial Ring in x, y over Finite

[sage-support] Re: Database Connection

2009-07-01 Thread William Stein
On Wed, Jul 1, 2009 at 10:58 AM, Robert Bradshawrober...@math.washington.edu wrote: On Jul 1, 2009, at 1:47 AM, Aleksey Gogolev wrote: Hello! I need to operate on a statistical data in the sage notebook. But before I do that I need to get this data from the Oracle DB. Is there a way to

[sage-support] Re: trying to understand the coercion model...

2009-07-01 Thread Kwankyu
Ok. '_populate_coercion_lists_ ' solve my problem. Thanks, Robert! Kwankyu --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more

[sage-support] Re: A little question about mod in function definition

2009-07-01 Thread David Joyner
On Wed, Jul 1, 2009 at 4:43 AM, Alasdairamc...@gmail.com wrote: Of these two examples: m(x)=mod(x,10) m=lambda x:mod(x,10) The first returns an error unable to convert x (=x) to an integer. Can anyone explain what's going on here? I think the first tries to use Sage's symbolic

[sage-support] Re: inverse_laplace() function: how does it work?

2009-07-01 Thread William Stein
On Tue, Jun 30, 2009 at 11:52 PM, David Joynerwdjoy...@gmail.com wrote: On Tue, Jun 30, 2009 at 4:26 PM, Fausto Arinos Barbutofausto.barb...@gmail.com wrote: Hi all, I'm afraid this question has already appeared in this forum, but here it goes again. I'm curious about why the

[sage-support] Re: Database Connection

2009-07-01 Thread Aleksey Gogolev
Thanks! 2009/7/1 William Stein wst...@gmail.com: On Wed, Jul 1, 2009 at 10:58 AM, Robert Bradshawrober...@math.washington.edu wrote: On Jul 1, 2009, at 1:47 AM, Aleksey Gogolev wrote: Hello! I need to operate on a statistical data in the sage notebook. But before I do that I need to

[sage-support] Re: stat functions

2009-07-01 Thread Mikie
I have create a function using scipy. Here it is Import scipy def Mean_(exp1) v=list(exp1) R1=scipy.stats(v) return R1 I have done all this in the notebook and get the same error. 'module' obj. is not callable. I am trying to add some stat functions to my API, since Sage does not

[sage-support] Re: stat functions

2009-07-01 Thread Mikie
Yes, I am calling one of the functions in scipy, but it will not me to do it. If I use the scipy mean function it works, but not from a created function. On Jul 1, 8:21 am, Kevin Horton khorto...@rogers.com wrote: On 1 Jul 2009, at 09:56, Mikie wrote: I have create a function using scipy.

[sage-support] Re: stat functions

2009-07-01 Thread Kevin Horton
On 1 Jul 2009, at 10:26, Mikie wrote: Yes, I am calling one of the functions in scipy, but it will not me to do it. If I use the scipy mean function it works, but not from a created function. The example you showed attempted to call a module, so it was sure to fail. We cannot guess why

[sage-support] Re: stat functions

2009-07-01 Thread Mikie
I don't what else I can say. Look at the articles about. On Jul 1, 8:38 am, Kevin Horton khorto...@rogers.com wrote: On 1 Jul 2009, at 10:26, Mikie wrote: Yes, I am calling one of the functions in scipy, but it will not me to do it.  If I use the scipy mean function it works, but not from

[sage-support] Re: stat functions

2009-07-01 Thread Marshall Hampton
I'm not sure what you meant; are you saying that Kevin's suggestion does not work? I.e. something like: import scipy.stats as S def Mean_(exp1): v=[RDF(x) for x in list(exp1)] R1=S.mean(v) return R1 Which works for me in the following way: sage: Mean_('1234') 2.5 Seems like you'd

[sage-support] Re: A little question about mod in function definition

2009-07-01 Thread William Stein
On Wed, Jul 1, 2009 at 8:52 PM, Simon Kingsimon.k...@uni-jena.de wrote: Hi Alasdair, On 1 Jul., 13:00, David Joyner wdjoy...@gmail.com wrote: I think the first tries to use Sage's symbolic expression machinery but the second does not. Yes, it seems so. Using Sage, one should always be