Re: [sage-support] Re: Is this a bug?

2010-09-17 Thread Robert Bradshaw
Oops. I'll post a fix.

On Fri, Sep 17, 2010 at 12:42 PM, kcrisman  wrote:
>
>
> On Sep 17, 2:30 pm, Alex Lara  wrote:
>> Hi everyone
>>
>> In Sage 4.5.2 and Sage 4.5.3, I get the following error using
>> partial_fraction_decomposition()
>>
>> sage: R. = GF(3)[]
>> sage: q = (x+1)/(x^3+x+1)
>
> If you try
>
> sage: q.part[tab]
>
> you'll see that this isn't a method for this object.
>
> You are also right that this *was* a method, even as recently as Sage
> 4.4.4.
>
> Old:
> sage: type(q)
> 
>
> New:
> sage: type(q)
> 
>
> Sounds like a small API change to me, though probably unintentional.
>
> Looks like ticket #9051, which added this file, was due to Robert
> Bradshaw.  I'm sure he or someone else will have additional info for
> you.  I would log this as a new Trac ticket, but I'm not sure whether
> this is related to http://trac.sagemath.org/sage_trac/ticket/8499
>
> Thanks for the report!
>
> - kcrisman
>
>
>>
>> The same error I get using primes different from 2. But if I use 3^2
>> instead of 3, or a power of some prime, I get a right answer.
>>
>> I did not have the problem using Sage 4.4.1.
>>
>> Thanks in advance.
>>
>> Alex
>
> --
> 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
> URL: http://www.sagemath.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
URL: http://www.sagemath.org


[sage-support] Re: "make" command not found

2010-09-17 Thread John Thurber
update.  I followed the advice of (re)-installing xcode from my snow
leopard cd. Sage is being built as I write...

thanks.

On Sep 17, 7:30 pm, John Thurber  wrote:
> Thanks for all the replies.  I actually went to the local Apple store
> earlier today and had Xcode installed there. However, the installation
> of Xcode was after opening the tarball.
> I thought maybe restarting was necessary, but it makes no difference.
> The installation put xcode in a file called Developer on the hard
> drive.
>
> Any other suggestions welcome.
>
> On Sep 17, 6:57 pm, Michael Welsh  wrote:
>
>
>
> > Install XCode (Developer Tools) from your Computer software DVD.
> > On 18/09/2010, at 1:34 PM, John T wrote:
>
> > > I'm new at all this.  Does it mean I need to reinstall something?
>
> > --http://yomcat.geek.nz

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] Re: "make" command not found

2010-09-17 Thread Michael Welsh
Have you tried make after installing XCode?

If you go into Terminal and type "whereis make" it should tell you something 
like /usr/bin/make

If it does nothing, you need to reinstall XCode.

if it tells you something, you can compile sage fine.

Michael
On 18/09/2010, at 2:30 PM, John Thurber wrote:

> The installation put xcode in a file called Developer on the hard
> drive.

--
http://yomcat.geek.nz

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: "make" command not found

2010-09-17 Thread John Thurber
Thanks for all the replies.  I actually went to the local Apple store
earlier today and had Xcode installed there. However, the installation
of Xcode was after opening the tarball.
I thought maybe restarting was necessary, but it makes no difference.
The installation put xcode in a file called Developer on the hard
drive.

Any other suggestions welcome.

On Sep 17, 6:57 pm, Michael Welsh  wrote:
> Install XCode (Developer Tools) from your Computer software DVD.
> On 18/09/2010, at 1:34 PM, John T wrote:
>
> > I'm new at all this.  Does it mean I need to reinstall something?
>
> --http://yomcat.geek.nz

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] "make" command not found

2010-09-17 Thread Michael Welsh
Install XCode (Developer Tools) from your Computer software DVD.
On 18/09/2010, at 1:34 PM, John T wrote:

> I'm new at all this.  Does it mean I need to reinstall something?

--
http://yomcat.geek.nz

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] "make" command not found

2010-09-17 Thread David Joyner
Do you have xcode or XDarwin installed?

On Fri, Sep 17, 2010 at 9:34 PM, John T  wrote:
> Hi,
>
> Seems like something is missing from my OS?
> trying to install from source on OSX 10.6.4.
> I downloaded the tarball, moved it into a folder titled sagesource.
> In a terminal window I changed into this directory, extracted the
> tarball. This created a "sage-4.5.3" directory.
>
> I cd'd into this directory, typed make.
>
> This returned "make: command not found"
>
> I'm new at all this.  Does it mean I need to reinstall something?
> Seems like a mac problem, not a sage problem.
>
> -John
>
> --
> 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
> URL: http://www.sagemath.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
URL: http://www.sagemath.org


Re: [sage-support] "make" command not found

2010-09-17 Thread Ryan Haynes
Probably need to install xcode.

On Fri, Sep 17, 2010 at 9:34 PM, John T  wrote:
> Hi,
>
> Seems like something is missing from my OS?
> trying to install from source on OSX 10.6.4.
> I downloaded the tarball, moved it into a folder titled sagesource.
> In a terminal window I changed into this directory, extracted the
> tarball. This created a "sage-4.5.3" directory.
>
> I cd'd into this directory, typed make.
>
> This returned "make: command not found"
>
> I'm new at all this.  Does it mean I need to reinstall something?
> Seems like a mac problem, not a sage problem.
>
> -John
>
> --
> 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
> URL: http://www.sagemath.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
URL: http://www.sagemath.org


[sage-support] "make" command not found

2010-09-17 Thread John T
Hi,

Seems like something is missing from my OS?
trying to install from source on OSX 10.6.4.
I downloaded the tarball, moved it into a folder titled sagesource.
In a terminal window I changed into this directory, extracted the
tarball. This created a "sage-4.5.3" directory.

I cd'd into this directory, typed make.

This returned "make: command not found"

I'm new at all this.  Does it mean I need to reinstall something?
Seems like a mac problem, not a sage problem.

-John

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread kcrisman
> Although to the casual observer, maxima's output might look like line
> noise, the dedicated reader will find that maxima's notation is
> actually quite close to the standard mathematical notation. You can

Exactly what I was trying to say.  The standard notation is just
extremely complicated - a surfeit of indices, as a grad school prof
once said.  Nils was even more patient than I was in detailing it,
thanks :)

- kcrisman

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] GAP on OSX (sage 4.4.1)

2010-09-17 Thread Franco Saliola
2010/5/12 Jérôme Tremblay :
> I am unable to run GAP from a network account on my mac.
>
> sage: gap('(1,2,3)')
>
> raise an exception.
>
> sage: gap_console()
>
> gives a little more information:
>
> Couldn't open saved workspace /Network/Servers/hostname.ca/Users/
> tremblayj/.sage//gap/workspace-4762775528093915922
>
> When I use a local account, everything works fine.
>
> Can anyone help me?
>
>
>
>
> Full session:
>
> sage: gap('(1,2,3)')
> ---
> TypeError                                 Traceback (most recent call
> last)
>
> /Network/Servers/thales.math.uqam.ca/Users/tremblayj/
> in ()
>
> /Library/sage/local/lib/python2.6/site-packages/sage/interfaces/
> expect.py in __call__(self, x, name)
>   1030
>   1031         if isinstance(x, basestring):
> -> 1032             return cls(self, x, name=name)
>   1033         try:
>   1034             return self._coerce_from_special_method(x)
>
> /Library/sage/local/lib/python2.6/site-packages/sage/interfaces/
> expect.py in __init__(self, parent, value, is_name, name)
>   1449             except (TypeError, KeyboardInterrupt,
> RuntimeError, ValueError), x:
>   1450                 self._session_number = -1
> -> 1451                 raise TypeError, x
>   1452         self._session_number = parent._session_number
>   1453
>
> TypeError: Unable to start gap
> sage: gap_console()
> Couldn't open saved workspace /Network/Servers/thales.math.uqam.ca/
> Users/tremblayj/.sage//gap/workspace-4762775528093915922
> sage: version()
> 'Sage Version 4.4.1, Release Date: 2010-05-02'
> sage:

I created a ticket with a patch:

http://trac.sagemath.org/sage_trac/ticket/9938

Basically, GAP does not start if the path to the GAP workspace file
contains more than 82 characters.

Franco

--

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread Nils Bruin
On Sep 17, 1:23 pm, sps  wrote:

> I'm a mathematician, not a traslator of uncomprensible characters!!
Many non-mathematicians would argue that the latter implies the
former :-)

Computer algebra packages such a maxima have to work a little to
squeeze mathematical notation on a single line and they require the
user to meet them somewhere halfway. If you read the documentation of
Maxima [http://maxima.sourceforge.net/docs/manual/en/maxima_16.html],
you can find that the notation

%f[p,q]([a1,...,ap],[b1,...,bq],z)

stands for the generalized hypergeometric function (see
http://en.wikipedia.org/wiki/Generalized_hypergeometric_series)

p_F_q ( a1,...,ap ; b1,...,bq; z )

and that %i stands for the complex number i=sqrt(-1) [because I'm
typing this into a plain text message board, I have to make notational
compromises as well]

Although to the casual observer, maxima's output might look like line
noise, the dedicated reader will find that maxima's notation is
actually quite close to the standard mathematical notation. You can
argue that the "%" convention for "standard symbols" is possibly ill-
conceived, but having "f" (or even "F") and "i" reserved for the
hypergeometric function and sqrt(-1) respectively would have been
inconvenient, since those symbols are popular with mathematicians for
other uses as well.

I haven't checked if maxima's answer is correct. The fact that one
should worry about that usually causes much more serious concern than
the form in which computer algebra packages give their answers.

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread ma...@mendelu.cz
Hi, I think that there is no simple method how to write the result in
simple terms. Similarly as we read sin(x) "sine of x" we can read

%f[4,3]([1,1,-(sqrt(3)*%i+1)/2,(sqrt(3)*%i-1)/2],
 [2,-(sqrt(3)*%i-1)/2,(sqrt(3)*%i+1)/2],%i/2)

as Generalized Hypergeometric function .

for %f see http://maxima.sourceforge.net/docs/manual/en/maxima_16.html#SEC56
or you can ask Maxima group.

%i is square root of -1

Hope this helps
Robert





On 17 zář, 22:23, sps  wrote:
> Perhaps you don't have me very well understood!
>
> When I said:
> 'Can you explicitly write the results?'
> I want to know how I can read this espression:
>
> (%o4) %f[4,3]([1,1,-(sqrt(3)*%i+1)/2,(sqrt(3)*%i-1)/2],
>               [2,-(sqrt(3)*%i-1)/2,(sqrt(3)*%i+1)/2],%i/2)
>
> For example:
> integral(3x^3,x)
> x^3
>
> and I can understand what is its mathematical expression: x*x*x
>
> But what's the meaning of an expression like:
> %0aLog(%3+-/)
> it's out of knowledge of a matematician.
>
> I'm a mathematician, not a traslator of uncomprensible characters!!

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: integral

2010-09-17 Thread Yann
If I try this, here is what I get:

sage: var('a')
a
sage: integral(cos(2*x)/(x^2+a^2),x,-Infinity,+Infinity)
ERROR: An unexpected error occurred while tokenizing input
...
TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(a>0)' before integral or limit
evaluation, for example):
Is  a  positive, negative, or zero?


Ok, let's do this

sage: assume(a>0)
sage: integral(cos(2*x)/(x^2+a^2),x,-Infinity,+Infinity)
pi*e^(-2*a)/a

Is it what you expect?

On Sep 17, 10:25 pm, sps  wrote:
> I want to calculate
>
> integral(cos(2x)/(x^2+a^2),x,-Infinity,+Infinity)
>
> but Sage return me an error message.
>
> What I have to digit
>
> Thank you

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: GUI Error.

2010-09-17 Thread Marshall Hampton
What is your default browser?  If it isn't Firefox, can you try using
http://localhost:8000 there?

-M. Hampton

On Sep 17, 2:13 pm, alien308  wrote:
> I make sage from sources, version 4.5.3. Run a command "./sage" from
> sage root directory  (sage-4.5.3). Type notebook()
> Browser output:
>
> Unable to load page
> Problem occurred while loading the 
> URLhttp://localhost:8000/?startup_token=b3f0af391295d422bb45534552486b58
> Cannot connect to destination
>
> System: Debian Squeeze, desktop: Gnome.

-- 
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
URL: http://www.sagemath.org


[sage-support] integral

2010-09-17 Thread sps
I want to calculate

integral(cos(2x)/(x^2+a^2),x,-Infinity,+Infinity)

but Sage return me an error message.

What I have to digit

Thank you

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread sps
Perhaps you don't have me very well understood!

When I said:
'Can you explicitly write the results?'
I want to know how I can read this espression:

(%o4) %f[4,3]([1,1,-(sqrt(3)*%i+1)/2,(sqrt(3)*%i-1)/2],
  [2,-(sqrt(3)*%i-1)/2,(sqrt(3)*%i+1)/2],%i/2)


For example:
integral(3x^3,x)
x^3

and I can understand what is its mathematical expression: x*x*x

But what's the meaning of an expression like:
%0aLog(%3+-/)
it's out of knowledge of a matematician.

I'm a mathematician, not a traslator of uncomprensible characters!!

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread kcrisman


On Sep 17, 3:17 pm, sps  wrote:
> Can you explicitly write the results?

This might help you:


(%i2) display2d:false;

(%o2) false
(%i3) load(simplify_sum);

(%o3) "/Users/.../sage-4.4.4/local/share/maxima/5.20.1/share/contrib/
solve_rec/simplify_sum.mac"
(%i4) simplify_sum(sum(((2*%i)^n/(n^3+1)*(1/4)^n),n,0,inf))
;

(%o4) %f[4,3]([1,1,-(sqrt(3)*%i+1)/2,(sqrt(3)*%i-1)/2],
  [2,-(sqrt(3)*%i-1)/2,(sqrt(3)*%i+1)/2],%i/2)

So this is the hypergeometric function F_{4,3} (where usually the 4 is
on the left and  the three on the right) evaluated at the values 1, 1,
and so one, where %i is just one of the square roots of negative one.
You'll note that there are two sets of things to evaluate it at, plus
the third (i/2).  These are not necessarily easy to compute.

See http://mathworld.wolfram.com/GeneralizedHypergeometricFunction.html,
for instance.  I don't know that I can make this any easier to
compute, though!  But unfortunately I cannot make the hypergeometric
functions easy (though they are very useful).

I'm not quite sure if this is the answer you are looking for or not,
so let us know.

- kcrisman

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: Is this a bug?

2010-09-17 Thread kcrisman


On Sep 17, 2:30 pm, Alex Lara  wrote:
> Hi everyone
>
> In Sage 4.5.2 and Sage 4.5.3, I get the following error using
> partial_fraction_decomposition()
>
> sage: R. = GF(3)[]
> sage: q = (x+1)/(x^3+x+1)

If you try

sage: q.part[tab]

you'll see that this isn't a method for this object.

You are also right that this *was* a method, even as recently as Sage
4.4.4.

Old:
sage: type(q)


New:
sage: type(q)


Sounds like a small API change to me, though probably unintentional.

Looks like ticket #9051, which added this file, was due to Robert
Bradshaw.  I'm sure he or someone else will have additional info for
you.  I would log this as a new Trac ticket, but I'm not sure whether
this is related to http://trac.sagemath.org/sage_trac/ticket/8499

Thanks for the report!

- kcrisman


>
> The same error I get using primes different from 2. But if I use 3^2
> instead of 3, or a power of some prime, I get a right answer.
>
> I did not have the problem using Sage 4.4.1.
>
> Thanks in advance.
>
> Alex

-- 
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
URL: http://www.sagemath.org


[sage-support] GUI Error.

2010-09-17 Thread alien308
I make sage from sources, version 4.5.3. Run a command "./sage" from
sage root directory  (sage-4.5.3). Type notebook()
Browser output:

Unable to load page
Problem occurred while loading the URL
http://localhost:8000/?startup_token=b3f0af391295d422bb45534552486b58
Cannot connect to destination

System: Debian Squeeze, desktop: Gnome.

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: summation

2010-09-17 Thread sps
Can you explicitly write the results?

Thank you very much


-- 
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
URL: http://www.sagemath.org


[sage-support] Is this a bug?

2010-09-17 Thread Alex Lara
Hi everyone

In Sage 4.5.2 and Sage 4.5.3, I get the following error using
partial_fraction_decomposition()

sage: R. = GF(3)[]
sage: q = (x+1)/(x^3+x+1)
sage: q.partial_fraction_decomposition()
---
AttributeErrorTraceback (most recent call
last)

/home/lrodri/ in ()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/element.so in sage.structure.element.Element.__getattr__
(sage/structure/element.c:2632)()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:2835)()

/home/lrodri/sage-4.5.2/local/lib/python2.6/site-packages/sage/
structure/parent.so in sage.structure.parent.raise_attribute_error
(sage/structure/parent.c:2602)()

AttributeError: 'sage.rings.fraction_field_FpT.FpTElement' object has
no attribute 'partial_fraction_decomposition'

The same error I get using primes different from 2. But if I use 3^2
instead of 3, or a power of some prime, I get a right answer.

I did not have the problem using Sage 4.4.1.

Thanks in advance.

Alex

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: integer factorization benchmarks

2010-09-17 Thread Harald Schilly
On Sep 16, 10:10 pm, Greg Marks  wrote:
> Out of curiosity...
>
> At http://sagemath.org/tour-benchmarks.html the CPU time
> given for factorization of the integer  2^512 - 1  with SAGE
> version 4.1.1 is 92.29 sec.

Hi, I'm the one who created that page. I did them on my machine back
then when I created it. It's just some overview of selected routines
for some operations. The only thing I can assure you is that they are
run on the same machine with the given version numbers and I haven't
cheated when copy/pasting the numbers ;)

Is there interest in more benchmarks? My idea would be to write a
script that collects data (if available, runs the corresponding
commands in mathematica, maple and friends, too) and generates a
report with data about the machine and OS. On the website I could
generate an aggregated view of all submitted entries. Of course,
somebody has to code all that ...

H

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: Using PyWavelets in Sage

2010-09-17 Thread Marshall Hampton
I just made an spkg for this that seems to work, so you could also do:

sage -i http://sage.math.washington.edu/home/mhampton/PyWavelets-0.2.0.p0.spkg

Putting this in the experimental repository is now trac ticket 9932:

http://trac.sagemath.org/sage_trac/ticket/9932

-Marshall Hampton

On Sep 16, 11:51 pm, Minh Nguyen  wrote:
> Hi,
>
>
>
> On Fri, Sep 17, 2010 at 12:07 PM, j wade  wrote:
> > I would like to use PyWavelets (http://www.pybytes.com/pywavelets/) in
> > Sage.
>
> > I am running Sage 4.3.4 on Ubuntu 9.10.
>
> > I have installed python-pywt using Synaptic File Manager, but I am not
> > sure what to do beyond this.  I have refreshed the libraries, and
> > tried
>
> > import scipy
> > from scipy import pywt
>
> > and
>
> > import scipy
> > import pywt
>
> > but neither command recognizes pywt.
>
> The above steps failed because by default Sage doesn't recognize
> Python packages that you have installed system-wide. That is, the
> package manager Synaptic installs packages system-wide, whereas the
> packages (including Python ones) in Sage are installed specifically
> under the SAGE_ROOT top-level directory. So when you issued
>
> import pywt
>
> from within a Sage session, Sage couldn't find pywt because PyWavelets
> was not installed under a place where Sage would by default recognize.
>
> > If someone out there is using pywavelets with Sage, I'd appreciate it
> > if you could let me know how you were able to get it to work.
>
> Here are the steps that should allow you to install and use PyWavelets
> from within Sage.
>
> (1) Download a source release of PyWavelets 
> fromhttp://pypi.python.org/pypi/PyWavelets/. I downloaded
> PyWavelets-0.2.0.tar.bz2 and uncompressed it.
>
> (2) Get the absolute path to your local Sage installation. In my case, it's
>
> /dev/shm/mvngu/sage-4.5.3
>
> (3) Navigate to the top-level directory of the uncompressed PyWavelets
> package and install it:
>
> $ cd /path/to/PyWavelets-0.2.0/
> $ /dev/shm/mvngu/sage-4.5.3/sage -python setup.py install
> 
>
> (4) Load Sage and start using PyWavelets:
>
> $ /dev/shm/mvngu/sage-4.5.3/sage
> --
> | Sage Version 4.5.3, Release Date: 2010-09-04                       |
> | Type notebook() for the GUI, and license() for information.        |
> --
> sage: import pywt
> sage: pywt.families()
> ['haar', 'db', 'sym', 'coif', 'bior', 'rbio', 'dmey']
> sage: w = pywt.Wavelet('db3')
> sage: print w
> Wavelet db3
>   Family name:    Daubechies
>   Short name:     db
>   Filters length: 6
>   Orthogonal:     True
>   Biorthogonal:   True
>   Symmetry:       asymmetric
>
> --
> Regards
> Minh Van Nguyen

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: Mersenne prime test

2010-09-17 Thread Michael
OK, thanks a lot, I did it that way and now it works.

On 17 Sep., 10:51, Dan Drake  wrote:
> On Fri, 17 Sep 2010 at 01:25AM -0700, Michael wrote:
> > The Algorithm works as follows:
>
> > Initialize the value for p
> > G←−2
> > for i from 1 to p − 1 do
> > G ← (G^2 + 12)^2/(4 · G · (G^2 − 12)) (mod Mp)
> > If G does not exist, then stop the Algorithm, Mp is not prime
> > end do
> > If G = 0 then Mp is prime
> > else Mp is not prime
>
> > How can I interrupt the loop? I tried a try...except statement, but it
> > seems that the ringarithmetic of Sage doesn't produce an error if an
> > element to be divided by is not invertible.
>
> You can break out of loops in Python/Sage with "break":
>
>     for i in range(100):
>         # do stuff
>         if i == 50:
>             break
>     # do more stuff
>
> In the above loop, when i hits 50, it will "do stuff", and then jump out
> of the loop and continue.
>
> Dan
>
> --
> ---  Dan Drake
> -  http://mathsci.kaist.ac.kr/~drake
> ---
>
>  signature.asc
> < 1 KBAnzeigenHerunterladen

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] Mersenne prime test

2010-09-17 Thread Dan Drake
On Fri, 17 Sep 2010 at 01:25AM -0700, Michael wrote:
> The Algorithm works as follows:
>
> Initialize the value for p
> G←−2
> for i from 1 to p − 1 do
> G ← (G^2 + 12)^2/(4 · G · (G^2 − 12)) (mod Mp)
> If G does not exist, then stop the Algorithm, Mp is not prime
> end do
> If G = 0 then Mp is prime
> else Mp is not prime
>
> How can I interrupt the loop? I tried a try...except statement, but it
> seems that the ringarithmetic of Sage doesn't produce an error if an
> element to be divided by is not invertible.

You can break out of loops in Python/Sage with "break":

for i in range(100):
# do stuff
if i == 50:
break
# do more stuff

In the above loop, when i hits 50, it will "do stuff", and then jump out
of the loop and continue.

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-support] Mersenne prime test

2010-09-17 Thread Michael
Hello!

I am trying to write an alternative test method for the primality of
Mersenne numbers based on the paper "An Elliptic Curve test for
Mersenne primes" by B.H. Gross.

I tried to implement the resulting algorithm in Sage, it did work, BUT
there is still one problem: the Algorithm should not need the full
amount of iterations if the tested Mersenne number Mp is not prime.

The Algorithm works as follows:

Initialize the value for p
G←−2
for i from 1 to p − 1 do
G ← (G^2 + 12)^2/(4 · G · (G^2 − 12)) (mod Mp)
If G does not exist, then stop the Algorithm, Mp is not prime
end do
If G = 0 then Mp is prime
else Mp is not prime

How can I interrupt the loop? I tried a try...except statement, but it
seems that the ringarithmetic of Sage doesn't produce an error if an
element to be divided by is not invertible.

I will also post my code for the routine (there I have to admit that
I'm totally new to Sage and so I'm quite sure the way I tried to
implement that is not very elegant or efficient).

Thanks a lot for your support!

P.S.: I don't know exactly how the is_prime() statement works, maybe
that test could make it a little faster since it needs less operations
than the Lucas-Lehmer-Test.

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] Re: installation problem

2010-09-17 Thread Dan Drake
On Fri, 17 Sep 2010 at 08:40AM +0100, robin hankin wrote:
> thanks for this.  I suppose "dependency" isn't quite the right word here.
>
> The error message below is cut-and-pasted from the output of 'make';
> at one point it asks me to email sage-devel, but perhaps this list
> is better for now!

Ah, I see. I think "readline hell" is a better description than
"dependency hell". :)  I hope we can get this sorted out.

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


Re: [sage-support] Re: installation problem

2010-09-17 Thread robin hankin
Hello Dan

thanks for this.  I suppose "dependency" isn't quite the right word here.

The error message below is cut-and-pasted from the output of 'make';
at one point it asks me to email sage-devel, but perhaps this list
is better for now!

best wishes

Robin



Host system
uname -a:
Linux le112 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200
i686 i686 i386 GNU/Linux


CC Version
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib
--with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.5
--enable-linux-futex --without-system-libunwind --enable-gold
--with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic
--build=i586-suse-linux
Thread model: posix
gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)

bash: symbol lookup error: bash: undefined symbol: rl_filename_rewrite_hook

real0m0.002s
user0m0.000s
sys 0m0.001s
sage: An error occurred while installing sqlite-3.6.22
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /home/rksh/Download/sage-4.5.3/install.log.  Describe your
computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/rksh/Download/sage-4.5.3/spkg/build/sqlite-3.6.22 and type 'make
check' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/home/rksh/Download/sage-4.5.3/spkg/build/sqlite-3.6.22' &&
'/home/rksh/Download/sage-4.5.3/sage' -sh)
When you are done debugging, you can type "exit" to leave the
subshell.
make[1]: *** [installed/sqlite-3.6.22] Error 1
make[1]: Leaving directory `/home/rksh/Download/sage-4.5.3/spkg'

real0m29.324s
user0m20.838s
sys 0m3.264s
Error building Sage.
./sage -docbuild all html  2>&1 | tee -a dochtml.log
python: can't open file
'/home/rksh/Download/sage-4.5.3/devel/sage/doc/common/builder.py':
[Errno 2] No such file or directory
le112:~/Download/sage-4.5.3%


On Fri, Sep 17, 2010 at 12:08 AM, Dan Drake  wrote:
> On Thu, 16 Sep 2010 at 07:43PM +0100, robin hankin wrote:
>> I did try to compile my own, but ran in to utter dependency hell.
>
> The Sage source should include very nearly everything it needs to build.
> There are very few dependencies. What kind of "dependency hell" did you
> run into?
>
> Dan
>
> --
> ---  Dan Drake
> -  http://mathsci.kaist.ac.kr/~drake
> ---
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkySo3YACgkQr4V8SljC5LrLOACfQSxMAi2aSFl5LJRSwvewt3/l
> S+AAnimn5caqEvhfly43g6Urm9qOVjfj
> =DZ3D
> -END PGP SIGNATURE-
>
>



-- 
Robin Hankin
Uncertainty Analyst
hankin.ro...@gmail.com

-- 
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
URL: http://www.sagemath.org