[sage-support] shortest paths in graphs

2008-02-22 Thread vgermrk

This works:
graphs.CubeGraph(4).shortest_paths('')
but this don't:
graphs.CubeGraph(4).shortest_path_all_pairs()

Maybe the "shortest_path_all_pairs" function needs a
"by_weight=False"   parameter too (like the other shortest paths
functions).

I also would like to have a function  "all_shortest_paths(u,v)", which
returns all shortest paths from u to v.
I know i could use "all_paths" and then pick the shortest, but that's
really inefficient.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread Simon King

Dear John,

On Feb 22, 1:50 am, John Palmieri <[EMAIL PROTECTED]> wrote:
> I'm having problems with this: if I call this tensorpower.spyx (or use
> the one you emailed to me), I get this:
>
> sage: attach tensorpower.spyx
> Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not
> implemented.

I don't know where this comes from, sorry,

> I have one question about the results of your computation; see below.
> > //   characteristic : 0
> > //   number of vars : 6
>
> Shouldn't this be 9?

Yes. Sorry, first i did the example with tensorpower(S,2), but then i
thought tensorpower(S,3) is nicer, and then i made a mistake with cut-
and-past. So, it *is* 9.

Yours
  Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread Simon King

Dear William,

On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> >  If I rename it to tensor.sage (not sure if this is a good idea),
>
> Yes, that's a VERY GOOD idea.  It's really crazy to use a compiled
> spyx for the purposes of interfacing with the Singular interpreter
> via pexpect.

Sorry, using a compiled spyx was just, well, let's call it my personal
tradition.

Am i right that the loop must be re-written if it is .sage rather
than .spyx?
I think
   for i from 1<=i<=len(L[2]):
is only possible in .spyx, while in .sage it should be
   for i in range(1,len(L[2])+1)

@John, this would explain the new error message after renaming the
file.

However, i don't know why attaching the .spyx didn't work.

Yours
 Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Errno 13 on worksheet cells after uploading

2008-02-22 Thread AprèsTech

Hello,

After uploading a worksheet from my PC to the sagenb.org server, I
can't edit or evaluate cells within it.  I'm receiving the error
message

Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 13] Permission denied: '/home/server2/sage_notebook/
worksheets/aprestech/4/code/3.py'

Did I do something wrong, or is this a bug?

Thanks,
Andy

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Trying to graph cubic function f(x)=x^(1/3)

2008-02-22 Thread Andy

I am interested in the use of Sage as a teaching tool at all grade
levels.  At the moment, I'm trying to weave Sage into an introductory
algebra curriculum.

I can graph all the basic functions with plot(x), replacing x with
x^2, x^3, 1/x, etc.  The one I can't get to work is x^(1/3).  I've
tried to express the cube root function several different ways.  The
expression I'm using now is:

sage:
show(plot(x^(1/3),-10,10),figsize=[5,5],xmin=-10,xmax=10,ymin=-10,ymax=10)

I receive the error message  "TypeError: 'float' object is
unsubscriptable"

Also, is the expression above the most succinct way to generate a
graph with this kind of view, x and y ranging -10 to 10?

Thanks for any advice.

Andy
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: Trying to graph cubic function f(x)=x^(1/3)

2008-02-22 Thread Alex Ghitza

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Andy,

I had the exact same question a few days ago.  There are
many issues involved here, but the short answer to your
question (provided by Carl Witty) is:

you can plot x^(1/3) with

show(plot(lambda x : RR(x).nth_root(3), -10, 10), figsize=[5,5], 
ymin=-10, ymax=10)

You don't need to specify xmin and xmax in show since they're
given in the plot command.

Best,
Alex



Andy wrote:
| I am interested in the use of Sage as a teaching tool at all grade
| levels.  At the moment, I'm trying to weave Sage into an introductory
| algebra curriculum.
|
| I can graph all the basic functions with plot(x), replacing x with
| x^2, x^3, 1/x, etc.  The one I can't get to work is x^(1/3).  I've
| tried to express the cube root function several different ways.  The
| expression I'm using now is:
|
| sage:
| show(plot(x^(1/3),-10,10),figsize=[5,5],xmin=-10,xmax=10,ymin=-10,ymax=10)
|
| I receive the error message  "TypeError: 'float' object is
| unsubscriptable"
|
| Also, is the expression above the most succinct way to generate a
| graph with this kind of view, x and y ranging -10 to 10?
|
| Thanks for any advice.
|
| Andy
| |
|


- --
Alexandru Ghitza
Assistant Professor
Department of Mathematics
Colby College
Waterville, ME 04901
http://bayes.colby.edu/~ghitza/
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHvtngdZTaNFFPILgRAvbjAJ9qlM5R2UnmCHwOMV2HOlhg+LcwZACcC21K
Mrx/wRMSjGXeYz2KpkXN0Xo=
=O3v+
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: Trying to graph cubic function f(x)=x^(1/3)

2008-02-22 Thread William Stein

On Fri, Feb 22, 2008 at 6:19 AM, Alex Ghitza <[EMAIL PROTECTED]> wrote:
>
>  -BEGIN PGP SIGNED MESSAGE-
>  Hash: SHA1
>
>  Hi Andy,
>
>  I had the exact same question a few days ago.  There are
>  many issues involved here, but the short answer to your
>  question (provided by Carl Witty) is:
>
>  you can plot x^(1/3) with
>
>  show(plot(lambda x : RR(x).nth_root(3), -10, 10), figsize=[5,5],
>  ymin=-10, ymax=10)
>
>  You don't need to specify xmin and xmax in show since they're
>  given in the plot command.
>

Hi,

What would people think of improving the _error_ message to plot
so that it prints some additional helpful information for certain strikingly
common situations?  +1 ?  -1?

 -- William


>  Andy wrote:
>  | I am interested in the use of Sage as a teaching tool at all grade
>  | levels.  At the moment, I'm trying to weave Sage into an introductory
>  | algebra curriculum.
>  |
>  | I can graph all the basic functions with plot(x), replacing x with
>  | x^2, x^3, 1/x, etc.  The one I can't get to work is x^(1/3).  I've
>  | tried to express the cube root function several different ways.  The
>  | expression I'm using now is:
>  |
>  | sage:
>  | show(plot(x^(1/3),-10,10),figsize=[5,5],xmin=-10,xmax=10,ymin=-10,ymax=10)
>  |
>  | I receive the error message  "TypeError: 'float' object is
>  | unsubscriptable"
>  |
>  | Also, is the expression above the most succinct way to generate a
>  | graph with this kind of view, x and y ranging -10 to 10?
>  |
>  | Thanks for any advice.
>  |
>  | Andy
>  | |
>  |
>
>
>  - --
>  Alexandru Ghitza
>  Assistant Professor
>  Department of Mathematics
>  Colby College
>  Waterville, ME 04901
>  http://bayes.colby.edu/~ghitza/
>  -BEGIN PGP SIGNATURE-
>  Version: GnuPG v2.0.7 (GNU/Linux)
>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>  iD8DBQFHvtngdZTaNFFPILgRAvbjAJ9qlM5R2UnmCHwOMV2HOlhg+LcwZACcC21K
>  Mrx/wRMSjGXeYz2KpkXN0Xo=
>  =O3v+
>  -END PGP SIGNATURE-
>
>
>
>
>  >
>



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



[sage-support] Re: Errno 13 on worksheet cells after uploading

2008-02-22 Thread William Stein

On Thu, Feb 21, 2008 at 9:09 PM, AprèsTech <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  After uploading a worksheet from my PC to the sagenb.org server, I
>  can't edit or evaluate cells within it.  I'm receiving the error
>  message
>
>  Traceback (most recent call last):
>   File "", line 1, in 
>  IOError: [Errno 13] Permission denied: '/home/server2/sage_notebook/
>  worksheets/aprestech/4/code/3.py'
>
>  Did I do something wrong, or is this a bug?

This is *definitely* a bug on my part.  I'll look into it immediately.
If you still have this problem after you get this email, please
respond and let me know.

Also, can you get the bug to occur again by uploading another worksheet?
This problem is caused by the too-strict in this case security model.  It can
be fixed once for all if it is easily repeatable.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread William Stein

On Fri, Feb 22, 2008 at 12:50 AM, Simon King
<[EMAIL PROTECTED]> wrote:
>
>  Dear William,
>
>
>  On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > >  If I rename it to tensor.sage (not sure if this is a good idea),
>  >
>  > Yes, that's a VERY GOOD idea.  It's really crazy to use a compiled
>  > spyx for the purposes of interfacing with the Singular interpreter
>  > via pexpect.
>
>  Sorry, using a compiled spyx was just, well, let's call it my personal
>  tradition.
>
>  Am i right that the loop must be re-written if it is .sage rather
>  than .spyx?
>  I think
>
>for i from 1<=i<=len(L[2]):
>  is only possible in .spyx, while in .sage it should be
>for i in range(1,len(L[2])+1)

Yes, that is correct.   But when you're not working with pure C data structures
you're going to get no speed improvements by using
>for i from 1<=i<=len(L[2]):
instead of
>for i in range(1,len(L[2])+1)

You're just making things a little more difficult.

>  @John, this would explain the new error message after renaming the
>  file.

Yes, that would.

>
>  However, i don't know why attaching the .spyx didn't work.
>
>

That's very suspicious:

"sage: attach tensorpower.spyx
Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not
implemented."

That suggests there is either a very very weird serious bug that got
magically fixed
or maybe the above log isn't what really happened -- notice that in
the error message
it says .spy not  .spyx.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread John Palmieri



On Feb 22, 8:47 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Fri, Feb 22, 2008 at 12:50 AM, Simon King
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> >  Dear William,
>
> >  On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> >  > >  If I rename it to tensor.sage (not sure if this is a good idea),
>
> >  > Yes, that's a VERY GOOD idea.  It's really crazy to use a compiled
> >  > spyx for the purposes of interfacing with the Singular interpreter
> >  > via pexpect.
>
> >  Sorry, using a compiled spyx was just, well, let's call it my personal
> >  tradition.
>
> >  Am i right that the loop must be re-written if it is .sage rather
> >  than .spyx?
> >  I think
>
> >for i from 1<=i<=len(L[2]):
> >  is only possible in .spyx, while in .sage it should be
> >for i in range(1,len(L[2])+1)
>
> Yes, that is correct.   But when you're not working with pure C data 
> structures
> you're going to get no speed improvements by using
>
> >for i from 1<=i<=len(L[2]):
> instead of
> >for i in range(1,len(L[2])+1)
>
> You're just making things a little more difficult.
>
> >  @John, this would explain the new error message after renaming the
> >  file.
>
> Yes, that would.
>
>
>
> >  However, i don't know why attaching the .spyx didn't work.
>
> That's very suspicious:
>
> "sage: attach tensorpower.spyx
> Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not
> implemented."
>
> That suggests there is either a very very weird serious bug that got
> magically fixed
> or maybe the above log isn't what really happened -- notice that in
> the error message
> it says .spy not  .spyx.

Right, I'm confused by that, too, but that's what it says.  I just
took the new file tensorpower.sage that Simon sent me, copied it to
tp.spyx, and did the following (in a new worksheet).

sage: attach tp.spyx
Loading of file "/home/palmieri/.sage/tp.spy" has type not
implemented.
sage: attach tensorpower.sage
sage: R=singular.ring(2,'(x1,x12,x2)','dp')
sage: D=singular.matrix(3,3,'0,0,-x12, 0,0,0, 0,0,0')
sage: S=singular.nc_algebra(1,D)
sage: S
//   characteristic : 2
//   number of vars : 3
//block   1 : ordering dp
//  : namesx1 x12 x2
//block   2 : ordering C
//   noncommutative relations: ...

This is with Sage 2.9.3 on the linux box in my office, and I had a
similar problem with Sage 2.10.1 on my mac at home.

...

Now, after trying one or two more things, here's more information: if
I start sage from a terminal, then type "attach tp.spyx", I get an
error about not being able to find the file (which makes sense, since
I put the file in ~/.sage/, not in my home directory). Then I type
"notebook()", go to my web browser, and do the stuff I pasted in
above.  Then I quit that, go back to the terminal, hit ctrl-C twice,
and do "attach tp.spyx".  This time it works: typing "notebook()" and
then quitting it seems to change my default directory from ~/ to
~/.sage/.

So, anyway, it seems that I can attach .spyx files from the terminal
session, but not from a notebook in a web browser.

  John

>  -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread William Stein

On Fri, Feb 22, 2008 at 10:03 AM, John Palmieri <[EMAIL PROTECTED]> wrote:
>
>
>
>  On Feb 22, 8:47 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > On Fri, Feb 22, 2008 at 12:50 AM, Simon King
>  >
>  >
>  >
>
>
> > <[EMAIL PROTECTED]> wrote:
>  >
>  > >  Dear William,
>  >
>  > >  On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > >  > >  If I rename it to tensor.sage (not sure if this is a good idea),
>  >
>  > >  > Yes, that's a VERY GOOD idea.  It's really crazy to use a compiled
>  > >  > spyx for the purposes of interfacing with the Singular interpreter
>  > >  > via pexpect.
>  >
>  > >  Sorry, using a compiled spyx was just, well, let's call it my personal
>  > >  tradition.
>  >
>  > >  Am i right that the loop must be re-written if it is .sage rather
>  > >  than .spyx?
>  > >  I think
>  >
>  > >for i from 1<=i<=len(L[2]):
>  > >  is only possible in .spyx, while in .sage it should be
>  > >for i in range(1,len(L[2])+1)
>  >
>  > Yes, that is correct.   But when you're not working with pure C data 
> structures
>  > you're going to get no speed improvements by using
>  >
>  > >for i from 1<=i<=len(L[2]):
>  > instead of
>  > >for i in range(1,len(L[2])+1)
>  >
>  > You're just making things a little more difficult.
>  >
>  > >  @John, this would explain the new error message after renaming the
>  > >  file.
>  >
>  > Yes, that would.
>  >
>  >
>  >
>  > >  However, i don't know why attaching the .spyx didn't work.
>  >
>  > That's very suspicious:
>  >
>  > "sage: attach tensorpower.spyx
>  > Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not
>  > implemented."
>  >
>  > That suggests there is either a very very weird serious bug that got
>  > magically fixed
>  > or maybe the above log isn't what really happened -- notice that in
>  > the error message
>  > it says .spy not  .spyx.
>
>  Right, I'm confused by that, too, but that's what it says.  I just
>  took the new file tensorpower.sage that Simon sent me, copied it to
>  tp.spyx, and did the following (in a new worksheet).
>
>  sage: attach tp.spyx
>  Loading of file "/home/palmieri/.sage/tp.spy" has type not
>  implemented.
>  sage: attach tensorpower.sage
>  sage: R=singular.ring(2,'(x1,x12,x2)','dp')
>
> sage: D=singular.matrix(3,3,'0,0,-x12, 0,0,0, 0,0,0')
>  sage: S=singular.nc_algebra(1,D)
>  sage: S
>  //   characteristic : 2
>  //   number of vars : 3
>
> //block   1 : ordering dp
>  //  : namesx1 x12 x2
>  //block   2 : ordering C
>  //   noncommutative relations: ...
>
>  This is with Sage 2.9.3 on the linux box in my office, and I had a
>  similar problem with Sage 2.10.1 on my mac at home.
>
>  ...
>
>  Now, after trying one or two more things, here's more information: if
>  I start sage from a terminal, then type "attach tp.spyx", I get an
>  error about not being able to find the file (which makes sense, since
>  I put the file in ~/.sage/, not in my home directory). Then I type
>  "notebook()", go to my web browser, and do the stuff I pasted in
>  above.  Then I quit that, go back to the terminal, hit ctrl-C twice,
>  and do "attach tp.spyx".  This time it works: typing "notebook()" and
>  then quitting it seems to change my default directory from ~/ to
>  ~/.sage/.
>
>  So, anyway, it seems that I can attach .spyx files from the terminal
>  session, but not from a notebook in a web browser.

To attach files in a *local* notebook give the exact path to the file.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: Trying to graph cubic function f(x)=x^(1/3)

2008-02-22 Thread Jason Grout

Alex Ghitza wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi Andy,
> 
> I had the exact same question a few days ago.  There are
> many issues involved here, but the short answer to your
> question (provided by Carl Witty) is:
> 
> you can plot x^(1/3) with
> 
> show(plot(lambda x : RR(x).nth_root(3), -10, 10), figsize=[5,5], 
> ymin=-10, ymax=10)
> 
> You don't need to specify xmin and xmax in show since they're
> given in the plot command.


Good call.  I've published a worksheet illustrating this for the next 
person to ask it :).

https://www.sagenb.org/home/pub/1702/

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: shortest paths in graphs

2008-02-22 Thread Robert Miller

Looking at the repository, it seems as if I wrote these functions, but
I don't think that's right. Maybe this was one of the patches I merged
from Jason Grout, while his name wasn't getting on the changesets. I
seem to remember Emily Kirkman working on path functions, also. I'm
not sure what the origin of this code is, but the fact that it doesn't
work has been filed as a trac ticket:

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

On Feb 22, 12:20 am, vgermrk <[EMAIL PROTECTED]> wrote:
> This works:
> graphs.CubeGraph(4).shortest_paths('')
> but this don't:
> graphs.CubeGraph(4).shortest_path_all_pairs()
>
> Maybe the "shortest_path_all_pairs" function needs a
> "by_weight=False"   parameter too (like the other shortest paths
> functions).
>
> I also would like to have a function  "all_shortest_paths(u,v)", which
> returns all shortest paths from u to v.
> I know i could use "all_paths" and then pick the shortest, but that's
> really inefficient.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: noncommutative algebras

2008-02-22 Thread Simon King

Dear John,

a brief addendum to a previous post of yours:

On Feb 20, 10:22 pm, John Palmieri <[EMAIL PROTECTED]> wrote:
> By the way, is the following a bug?
>
> sage: singular.LIB('ncall.lib')
> sage: R=singular.ring(0,'(x1,x12,x2)','dp')
> sage: C=singular.matrix(3,3,'1,-1,-1, -1,1,-1, -1,-1,1')
> sage: C
>
> 1, -1,-1,
> -1,1, -1,
> -1,-1,1
> sage: R=singular.ring(0,'(x1,x12,x2)','dp')
> sage: C
> `sage1`

As William pointed out, this is not a bug.

When re-defining R, then i think the matrix C is in fact lost.
However, it may be worth mentioning that after defining the 'same'
ring under a new name, it is easy to produce a copy of C in the new
ring; let R and C be defined as above. Then:
sage: newR=singular.ring(0,'(x1,x12,x2)','dp')
sage: C
`sage1`
sage: newC=R.fetch(C)
sage: newC

1, -1,-1,
-1,1, -1,
-1,-1,1
sage: R.set_ring()
sage: C

1, -1,-1,
-1,1, -1,
-1,-1,1
sage: newC
`sage3`

You see, a matrix (or an ideal) is only accessible if its ring is
active. But as long as the ring is not overwritten, the matrix isn't
lost.

Singular offers two commands to ship data from one ring to another:
fetch and imap. See
http://www.singular.uni-kl.de/Manual/latest/sing_197.htm#SEC237
and
http://www.singular.uni-kl.de/Manual/latest/sing_215.htm#SEC255

Cheers
  Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: shortest paths in graphs

2008-02-22 Thread Jason Grout

Robert Miller wrote:
> Looking at the repository, it seems as if I wrote these functions, but
> I don't think that's right. Maybe this was one of the patches I merged
> from Jason Grout, while his name wasn't getting on the changesets. I
> seem to remember Emily Kirkman working on path functions, also. I'm
> not sure what the origin of this code is, but the fact that it doesn't
> work has been filed as a trac ticket:
> 
> http://trac.sagemath.org/sage_trac/ticket/2265
> 


And it's been patched too, waiting for review :)

I don't know who wrote it (I don't remember writing it), but see the 
tickets for details on the error.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: shortest paths in graphs

2008-02-22 Thread Robert Miller

> I also would like to have a function  "all_shortest_paths(u,v)", which
> returns all shortest paths from u to v.

See ticket:

http://trac.sagemath.org/sage_trac/ticket/2266
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: Errno 13 on worksheet cells after uploading

2008-02-22 Thread Andy

It's fixed!  I uploaded another worksheet, and it worked as expected.
Thank you for the quick response, and kudos for the impressive work of
bringing Sage into reality.


On Feb 22, 9:45 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 21, 2008 at 9:09 PM, AprèsTech <[EMAIL PROTECTED]> wrote:
>
> >  Hello,
>
> >  After uploading a worksheet from my PC to the sagenb.org server, I
> >  can't edit or evaluate cells within it.  I'm receiving the error
> >  message
>
> >  Traceback (most recent call last):
> >   File "", line 1, in 
> >  IOError: [Errno 13] Permission denied: '/home/server2/sage_notebook/
> >  worksheets/aprestech/4/code/3.py'
>
> >  Did I do something wrong, or is this a bug?
>
> This is *definitely* a bug on my part.  I'll look into it immediately.
> If you still have this problem after you get this email, please
> respond and let me know.
>
> Also, can you get the bug to occur again by uploading another worksheet?
> This problem is caused by the too-strict in this case security model.  It can
> be fixed once for all if it is easily repeatable.
>
> William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: Trying to graph cubic function f(x)=x^(1/3)

2008-02-22 Thread Andy

Alex

Thanks for your help.  I had searched the group and found the thread
about nth roots, but I wasn't putting it together with the plot
statement correctly.

Thanks also to Jason for publishing an illustration -- good idea.  The
published worksheets are a great resource for learning Sage and
working through the subtleties, one which I'll remember to search for
future questions.


On Feb 22, 7:19 am, Alex Ghitza <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Andy,
>
> I had the exact same question a few days ago.  There are
> many issues involved here, but the short answer to your
> question (provided by Carl Witty) is:
>
> you can plot x^(1/3) with
>
> show(plot(lambda x : RR(x).nth_root(3), -10, 10), figsize=[5,5],
> ymin=-10, ymax=10)
>
> You don't need to specify xmin and xmax in show since they're
> given in the plot command.
>
> Best,
> Alex
>
> Andy wrote:
>
> | I am interested in the use of Sage as a teaching tool at all grade
> | levels.  At the moment, I'm trying to weave Sage into an introductory
> | algebra curriculum.
> |
> | I can graph all the basic functions with plot(x), replacing x with
> | x^2, x^3, 1/x, etc.  The one I can't get to work is x^(1/3).  I've
> | tried to express the cube root function several different ways.  The
> | expression I'm using now is:
> |
> | sage:
> | show(plot(x^(1/3),-10,10),figsize=[5,5],xmin=-10,xmax=10,ymin=-10,ymax=10)
> |
> | I receive the error message  "TypeError: 'float' object is
> | unsubscriptable"
> |
> | Also, is the expression above the most succinct way to generate a
> | graph with this kind of view, x and y ranging -10 to 10?
> |
> | Thanks for any advice.
> |
> | Andy
> | |
> |
>
> - --
> Alexandru Ghitza
> Assistant Professor
> Department of Mathematics
> Colby College
> Waterville, ME 04901http://bayes.colby.edu/~ghitza/
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFHvtngdZTaNFFPILgRAvbjAJ9qlM5R2UnmCHwOMV2HOlhg+LcwZACcC21K
> Mrx/wRMSjGXeYz2KpkXN0Xo=
> =O3v+
> -END PGP SIGNATURE-
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] sage can't find matlab

2008-02-22 Thread chz

Hi there -

I have a local install of Matlab 2007b and a local install of Sage.
When I run a Matlab command from Sage, e.g. the command
matlab.eval('2+2')
I get the error "Unable to start matlab because the command 'matlab -
nodisplay' failed."  The location of the Matlab executable is included
in my PATH variable, so I'm not sure what the problem is.  I've
scoured the various tutorials & documentation available, as well as
the Sage wiki, and I couldn't find anyone addressing this issue.  Any
suggestions?

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] Re: sage can't find matlab

2008-02-22 Thread William Stein

On Fri, Feb 22, 2008 at 4:53 PM, chz <[EMAIL PROTECTED]> wrote:
>
>  Hi there -
>
>  I have a local install of Matlab 2007b and a local install of Sage.
>  When I run a Matlab command from Sage, e.g. the command
> matlab.eval('2+2')
>  I get the error "Unable to start matlab because the command 'matlab -
>  nodisplay' failed."  The location of the Matlab executable is included
>  in my PATH variable, so I'm not sure what the problem is.  I've
>  scoured the various tutorials & documentation available, as well as
>  the Sage wiki, and I couldn't find anyone addressing this issue.  Any
>  suggestions?

What happens if you type

sage:  !matlab

Also, what operating system, version of Matlab, etc.?

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
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
-~--~~~~--~~--~--~---



[sage-support] sage-2.10.2

2008-02-22 Thread William Stein

Hello folks,

Sage 2.10.2 has been released on February 23nd, 2008. It is available at

   http://sagemath.org/download.html

* About Sage (http://www.sagemath.org)

Sage is developed by volunteers and combines 71 open source packages.
It is available for download from sagemath.org and its mirrors in
source or binary form. If you have any questions and/or problems
please report them to the google groups sage-devel, sage-support,
You can also drop by in #sage-devel or #sage-support infreenode.

We have closed the Google Groups sage-newbie and sage-forum so
that we can deal with support questions in sage-support only. We
decided to close those two groups since we had various inquiries
left unanswered due to people posting to the wrong group.

 -- Michael Abshoff and William Stein

-

The following 35 people contributed to this release:

 * Tim Abbott
 * Michael Abshoff
 * Martin Albrecht
 * Nick Alexander
 * Jen Balakrishnan
 * Karim Belabas
 * Jonathan Bober
 * Tom Boothby
 * Robert Bradshaw
 * Nils Bruin
 * Craig Citro
 * John Cremona
 * Burcin Erocal
 * Gary Furnish
 * Alex Ghitza
 * Rob Gross
 * Jason Grout
 * John Hanke
 * Mike Hansen
 * David Harvey
 * Peter Jipsen
 * David Joyner
 * Kiran Kedlaya
 * Robert Miller
 * Kate Minola
 * Joel Mohler
 * Bobby Moretti
 * Willem Jan Palenstijn
 * Clement Pernet
 * David Roe
 * Jaap Spies
 * William Stein
 * John Voight
 * Justin Walker
 * Carl Witty

Cheers,

Michael Abshoff (release chair), William Stein

* Major Features, New Spkgs and Bugfixes

 * John Voight's fast new code for enumeration of totally
   real fields is now included.

 * David Roe's code for unramified and Eisenstein extensions
   of Qp and Zp is now included.

 * Clement Pernet, Burcin Erocal and William Stein have implemented
   an optimized p-adic/modular algorithm for computing Hermite
   normal forms of matrices over the integers.  For random square
   nonsingular matrices with small entries it is similar to Magma
   in speed, and vastly faster than the implementations in Gap,
   NTL, and PARI.  For matrices with large entries (e.g., 16 bits
   or more), it is faster than anything else in the world.
   For nonsquare matrices it is also reasonably good, though more
   optimization is needed since Magma is much better in some cases.
   We also implemented related code for computing determinants
   over QQ and ZZ, which is again the fastest in the world
   especially when the matrix entries are large.  The main
   reasons for the speed of our implementation are (1) IML is fast,
   and (2) we found some tricks that are not in the literature.

 * Tim Abbott and Michael Abshoff worked on the Debianization of
   the build process. Due to a lot of work done by Project Athena
   at MIT Tim Abbott contributed many build scripts for chroot
   environments. He also contributed build scripts for nearly
   all of the SPKGs not yet in Debian. Michael Abshoff did set
   up a test build server and while it has been shut down for
   now the Sage project will set up another 64 bit build server
   in the near future top provide Debian packages for a wide
   variety of Debian based distributions.

 * Graph Theory: Robert Miller has implemented edge-labeled graph
   isomorphism, and eliminated many bugs in the main backtrack algorithm.
   He also made a few minor optimizations, and added an option which
   visualizes the structure that is searched during the running of the
   algorithm. This should make it easier to see what the algorithm is
   actually doing. Jason Grout refereed, and found another bug in the
   process, which has also been fixed.  Also every permutation
   of every graph on seven or fewer vertices has been verified to
   give correct output.

 * Assorted bug and build fixes all over the map.

* Known Issues with 2.10.2:

 * None

* Bug Statistics

We closed 156 tickets. For details see

   http://trac.sagemath.org/sage_trac/milestone/sage-2.10.2

or check out the closed ticket section at the end of the
announcement.

* Upcoming Releases

The next release will be 2.10.3, chaired by Michael Abshoff and
Robert Miller. The release is planned post Sage Days 8, but
details are sketchy at the moment. Potential features include:

 * OSX 10.5 support in 64 bit mode [this will depend on fixing
   a vexing segfault in libSingular and getting disutils to
   play nice with numpy]
 * gcc 4.3 support out of the box
 * FreeBSD support out of the box
 * Improved experimental Solaris support

* Doctesting Coverage

For 2.10.1 we had:
Overall weighted coverage score:  38.3%
Total number of functions:  18290

We increased coverage by 1.8% in 2.10.2 while adding 238 functions:

Overall weighted coverage score:  40.1%
Total number of functions:  18528

* Closed Tickets:

Merged in final:

#2257: Craig Citro: re-fix doctest failures for 2.10.2.rc0 in
   sage/rings/number_field/
#2259: David Roe: Fix doctest in pow_computer
#2261: Mic