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 want to do some string processing first, like if you
have a comm-delimited input string, as Robert was saying.
-M. Hampton
On Jul 1, 8:26 am, Mikie <[email protected]> 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.
>
> On Jul 1, 8:21 am, Kevin Horton <[email protected]> wrote:
>
> > On 1 Jul 2009, at 09:56, Mikie wrote:
>
> > > 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.
>
> > My docs claim that scipy.stats is a module, not a function. Depending
> > on what exactly you want to do, you may need to call one of the
> > functions contained in the scipy.stats module, or you may simply want
> > the scipy.mean function:
>
> > def Mean_(exp1):
> > v=list(exp1)
> > R1=scipy.mean(v)
> > return R1
>
> > I'm no scipy expert, so this comment is worth what you paid for it.
>
> > --
> > Kevin Horton
> >
Ottawa, Canada
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---