[sage-support] Re: stat functions

2009-06-30 Thread Robert Bradshaw

On Jun 30, 2009, at 9:26 AM, Mikie wrote:

> OK, I have the string to list created.  I have created the function to
> calculate a mean of a list.  This is in the python script.  Using
> spipy I am getting " 'module' obj. is not callable'

There is really not enough information here to answer your question.  
Hopefully it's something trivial. A self-contained code snippet and  
traceback would go a long ways.

>
> On Jun 30, 10:04 am, Robert Bradshaw 
> wrote:
>> On Jun 30, 2009, at 8:23 AM, Mikie wrote:
>>
>>> How does one convert a string to a list?
>>
>> There are lots of ways to do that in Python--depends on what kind of
>> a list you have. For example, if I have a string list of elliptic
>> curve labels, and want a list of curves...
>>
>> sage: s = "37a|15a|389a"
>> sage: [EllipticCurve(ss) for ss in s.split('|')]
>> [Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field,
>>   Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10
>> over Rational Field,
>>   Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational
>> Field]
>>
>> You can do the same or integers, real numbers, symbolic equations
>> (use SR(ss)), with any separator, etc. Python has a lot of
>> documentation on string processing.
>>
>>
>>
>>> Try my new API pirsqrt.com:1843.  Try to break it.  If you put
>>> something bad into it use the back arrow on the browser.
>>
>>> On Jun 29, 4:14 pm, William Stein  wrote:
 On Tue, Jun 30, 2009 at 12:13 AM,
 Mikie wrote:
>>
> Before I get too excited can use Scipy in a python script(My  
> twisted
> API)
>>
 Yes.
>>
> Thanks William
>>
> On Jun 29, 3:54 pm, William Stein  wrote:
>> On Mon, Jun 29, 2009 at 11:44 PM,
>> Mikie wrote:
>>
>>> I have looked a lot.  Any docs on the stat(mean, stdev, median,
>>> etc)
>>> functions?  Does Sage have any stat functions?
>>
>> You might find the worksheets from week 6 here useful:
>>
>> http://wiki.wstein.org/09/480b/schedule
>>
>> William Stein
>> Associate Professor of Mathematics
>> University of Washingtonhttp://wstein.org
>>
 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org-Hide quoted text -
>>
 - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -
> >


--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: build errors for sage 4.0.1 on Fedora 11

2009-06-30 Thread Mike Witt

OK, sorry about that. I now realize that there is an spkg in ticket
#6362 which appears to fix this. So I'll try downloading that.

-Mike
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: build errors for sage 4.0.1 on Fedora 11

2009-06-30 Thread Mike Witt



On Jun 25, 2:18 pm, William Stein  wrote:
> On Thu, Jun 25, 2009 at 8:19 PM, Mike Witt wrote:
>
> > Was this ever resolved. I'm having the same problem with sage-4.0.2.
> > Should I be building a different version?
>
> We reported this to the Singular group, they agreed it is a bug, and they
> fixed it in their version.  I don't know if it has been fixed for the
> upcoming sage-4.1 yet or not.  I hope so.

This probably falls into the 'dumb question' category, but I'm not
clear
on how to proceed. I couldn't find a ticket related to this, and I
can't
figure out (1) How to tell when there's a version available that will
build on FC11, or (2) how to patch 4.0.2 so that it will build. I
guess
it just needs a cast(?) but I don't understand where it goes (not
directly
into febase.cc I presume). If anyone has time to either educate me
a little, or point me to relevant information ...

-Mike

--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



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

2009-06-30 Thread David Joyner

On Tue, Jun 30, 2009 at 4:26 PM, Fausto Arinos
Barbuto 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 inverse_laplace() function can't successfully 
> invert some
> well-known, nevertheless rather simple, functions.  Let's take exp(-as)/s as 
> an
> example, whose inverse is the Heaviside function H(t-a):
>
> var('s,t')
> f = (exp(-s)/s).inverse_laplace(s,t); f
>
> The evaluation of the second line produces:
>
> ilt(e^(-s)/s, s, t)
>
> Which, obviously, is not a satisfactory answer.  What happens here?
>
> How does inverse_laplace() work?

Right now, inverse_laplace calls maxima and the Heaviside function is not yet
well-integrated into maxima.
http://maxima.sourceforge.net/docs/manual/en/maxima_20.html#Item_003a-ilt
http://maxima.sourceforge.net/docs/manual/en/maxima_19.html#Item_003a-laplace


>
> Regards,
>
> Fausto
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



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

2009-06-30 Thread Fausto Arinos Barbuto


Hi all,

I'm afraid this question has already appeared in this forum, but here it goes 
again.

I'm curious about why the inverse_laplace() function can't successfully invert 
some
well-known, nevertheless rather simple, functions.  Let's take exp(-as)/s as an
example, whose inverse is the Heaviside function H(t-a):

var('s,t')
f = (exp(-s)/s).inverse_laplace(s,t); f

The evaluation of the second line produces:

ilt(e^(-s)/s, s, t)

Which, obviously, is not a satisfactory answer.  What happens here?

How does inverse_laplace() work?

Regards,

Fausto



--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: stat functions

2009-06-30 Thread Mikie

OK, I have the string to list created.  I have created the function to
calculate a mean of a list.  This is in the python script.  Using
spipy I am getting " 'module' obj. is not callable'

On Jun 30, 10:04 am, Robert Bradshaw 
wrote:
> On Jun 30, 2009, at 8:23 AM, Mikie wrote:
>
> > How does one convert a string to a list?
>
> There are lots of ways to do that in Python--depends on what kind of  
> a list you have. For example, if I have a string list of elliptic  
> curve labels, and want a list of curves...
>
> sage: s = "37a|15a|389a"
> sage: [EllipticCurve(ss) for ss in s.split('|')]
> [Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field,
>   Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10  
> over Rational Field,
>   Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational  
> Field]
>
> You can do the same or integers, real numbers, symbolic equations  
> (use SR(ss)), with any separator, etc. Python has a lot of  
> documentation on string processing.
>
>
>
> > Try my new API pirsqrt.com:1843.  Try to break it.  If you put
> > something bad into it use the back arrow on the browser.
>
> > On Jun 29, 4:14 pm, William Stein  wrote:
> >> On Tue, Jun 30, 2009 at 12:13 AM,  
> >> Mikie wrote:
>
> >>> Before I get too excited can use Scipy in a python script(My twisted
> >>> API)
>
> >> Yes.
>
> >>> Thanks William
>
> >>> On Jun 29, 3:54 pm, William Stein  wrote:
>  On Mon, Jun 29, 2009 at 11:44 PM,  
>  Mikie wrote:
>
> > I have looked a lot.  Any docs on the stat(mean, stdev, median,  
> > etc)
> > functions?  Does Sage have any stat functions?
>
>  You might find the worksheets from week 6 here useful:
>
> http://wiki.wstein.org/09/480b/schedule
>
>  William Stein
>  Associate Professor of Mathematics
>  University of Washingtonhttp://wstein.org
>
> >> --
> >> William Stein
> >> Associate Professor of Mathematics
> >> University of Washingtonhttp://wstein.org-Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: stat functions

2009-06-30 Thread Robert Bradshaw

On Jun 30, 2009, at 8:23 AM, Mikie wrote:

> How does one convert a string to a list?

There are lots of ways to do that in Python--depends on what kind of  
a list you have. For example, if I have a string list of elliptic  
curve labels, and want a list of curves...

sage: s = "37a|15a|389a"
sage: [EllipticCurve(ss) for ss in s.split('|')]
[Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field,
  Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10  
over Rational Field,
  Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational  
Field]

You can do the same or integers, real numbers, symbolic equations  
(use SR(ss)), with any separator, etc. Python has a lot of  
documentation on string processing.


> Try my new API pirsqrt.com:1843.  Try to break it.  If you put
> something bad into it use the back arrow on the browser.
>
> On Jun 29, 4:14 pm, William Stein  wrote:
>> On Tue, Jun 30, 2009 at 12:13 AM,  
>> Mikie wrote:
>>
>>> Before I get too excited can use Scipy in a python script(My twisted
>>> API)
>>
>> Yes.
>>
>>
>>
>>
>>
>>> Thanks William
>>
>>> On Jun 29, 3:54 pm, William Stein  wrote:
 On Mon, Jun 29, 2009 at 11:44 PM,  
 Mikie wrote:
>>
> I have looked a lot.  Any docs on the stat(mean, stdev, median,  
> etc)
> functions?  Does Sage have any stat functions?
>>
 You might find the worksheets from week 6 here useful:
>>
 http://wiki.wstein.org/09/480b/schedule
>>
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org
>>
>> --
>> William Stein
>> Associate Professor of Mathematics
>> University of Washingtonhttp://wstein.org- Hide quoted text -
>>
>> - Show quoted text -
> >


--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How can calculate the time of execution of a command in sage

2009-06-30 Thread William Stein

On Tue, Jun 30, 2009 at 4:58 PM, faicel wrote:
>
> I look for the command  allowing to have the time  of execution of a
> command in sage
>

Also, use the "time" command, e.g.,

sage: time 2+2
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
4
sage:

william

--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How can calculate the time of execution of a command in sage

2009-06-30 Thread Kevin Horton

On 30-Jun-09, at 10:58 , faicel wrote:

> I look for the command  allowing to have the time  of execution of a
> command in sage

sage: timeit?

...
Docstring:

 Time execution of a command or block of commands.  Displays the
 best WALL TIME for execution of the given code.  This is  
based on
 the Python timeit module, which avoids a number of common traps
 for measuring execution times.   It is also based on IPython's
 %timeout command.

 TYPICAL INPUT FORMAT:
 timeit(statement, preparse=None, number=0, repeat=3,  
precision=3)

 EXAMPLES:
 sage: timeit('2^1')
 625 loops, best of 3: ... per loop

...


--
Kevin Horton
Ottawa, Canada




--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: stat functions

2009-06-30 Thread Mikie

How does one convert a string to a list?
Try my new API pirsqrt.com:1843.  Try to break it.  If you put
something bad into it use the back arrow on the browser.

On Jun 29, 4:14 pm, William Stein  wrote:
> On Tue, Jun 30, 2009 at 12:13 AM, Mikie wrote:
>
> > Before I get too excited can use Scipy in a python script(My twisted
> > API)
>
> Yes.
>
>
>
>
>
> > Thanks William
>
> > On Jun 29, 3:54 pm, William Stein  wrote:
> >> On Mon, Jun 29, 2009 at 11:44 PM, Mikie wrote:
>
> >> > I have looked a lot.  Any docs on the stat(mean, stdev, median, etc)
> >> > functions?  Does Sage have any stat functions?
>
> >> You might find the worksheets from week 6 here useful:
>
> >>http://wiki.wstein.org/09/480b/schedule
>
> >> William Stein
> >> Associate Professor of Mathematics
> >> University of Washingtonhttp://wstein.org
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] How can calculate the time of execution of a command in sage

2009-06-30 Thread faicel

I look for the command  allowing to have the time  of execution of a
command in sage



  Thank you in advance
--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: numpy.random

2009-06-30 Thread William Stein

On Tue, Jun 30, 2009 at 5:59 AM, Ahmed Fasih wrote:
>
> On Jun 29, 8:37 pm, Kevin Horton  wrote:
>> It would be nice if that wiki FAQ mentioned the option of using an "r"
>> suffix.  I didn't know about that possibility until now.
>>
>> I tried to set up a wiki account so I could edit the page, but that
>> didn't seem to work.
>
> Took the liberty of doing so (forgive me for any breach of protocol):

Stepping in and getting stuff done isn't a breach of protocol -- it is
the protocol with Sage.  Thanks!

> http://wiki.sagemath.org/faq#Typeissuesusingscipy.2CcvxoptornumpyfromSage
> please feel free to edit as you see fit.
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
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 options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---