[sage-support] Re: Error message on installing Sage

2008-12-14 Thread William Stein
On Sun, Dec 14, 2008 at 11:20 PM, mabshoff wrote: > > > > On Dec 14, 7:30 pm, "William Stein" wrote: >> On Sun, Dec 14, 2008 at 12:20 PM, Spencer wrote: > > Hi, > >> > I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa >> > Rosa with Intel Core 2 Duo). On installing Sage and sta

[sage-support] Re: Error message on installing Sage

2008-12-14 Thread mabshoff
On Dec 14, 7:30 pm, "William Stein" wrote: > On Sun, Dec 14, 2008 at 12:20 PM, Spencer wrote: Hi, > > I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa > > Rosa with Intel Core 2 Duo). On installing Sage and starting it up for > > the first time I get the message: > > > "WAR

[sage-support] Re: help solving equations

2008-12-14 Thread William Stein
On Sun, Dec 14, 2008 at 10:53 PM, John H Palmieri wrote: > > I have some code which generates a bunch of expressions of the form > Sum (n_i a_i) where each n_i is an integer and each a_i is an unknown > in a field, and I'm most interested in the case when the field is GF > (p). Set each of these

[sage-support] help solving equations

2008-12-14 Thread John H Palmieri
I have some code which generates a bunch of expressions of the form Sum (n_i a_i) where each n_i is an integer and each a_i is an unknown in a field, and I'm most interested in the case when the field is GF (p). Set each of these expressions equal to zero. What's the best way in Sage to solve the

[sage-support] Re: Trying to find partitions of a pair of integers.

2008-12-14 Thread Martin Rubey
"Mike Hansen" writes: > Hello, > > On Sun, Dec 14, 2008 at 4:04 PM, green351 wrote: > > > > Hi, > > This is my first time emailing with a question and my first time > > trying to use Sage (I'm a complete programming dunce). I'm trying to > > do the following: > > Given the tuple (p,q) in Z x

[sage-support] Re: Trying to find partitions of a pair of integers.

2008-12-14 Thread Dan Drake
On Sun, 14 Dec 2008 at 05:09PM -0800, Mike Hansen wrote: > On Sun, Dec 14, 2008 at 4:04 PM, green351 wrote: > > This is my first time emailing with a question and my first time > > trying to use Sage (I'm a complete programming dunce). I'm trying to > > do the following: > > Given the tuple (p,q)

[sage-support] Re: Error message on installing Sage

2008-12-14 Thread William Stein
On Sun, Dec 14, 2008 at 12:20 PM, Spencer wrote: > > I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa > Rosa with Intel Core 2 Duo). On installing Sage and starting it up for > the first time I get the message: > > "WARNING! This Sage install was built on a machine that support

[sage-support] Re: Trying to find partitions of a pair of integers.

2008-12-14 Thread Mike Hansen
Hello, On Sun, Dec 14, 2008 at 4:04 PM, green351 wrote: > > Hi, > This is my first time emailing with a question and my first time > trying to use Sage (I'm a complete programming dunce). I'm trying to > do the following: > Given the tuple (p,q) in Z x Z and integer n I need to count the > numb

[sage-support] Trying to find partitions of a pair of integers.

2008-12-14 Thread green351
Hi, This is my first time emailing with a question and my first time trying to use Sage (I'm a complete programming dunce). I'm trying to do the following: Given the tuple (p,q) in Z x Z and integer n I need to count the number of integer-tuple solutions to the following (p,q)=(a_1,b_1)+...+(a_n,

[sage-support] Re: local matrix assignment behaves as global

2008-12-14 Thread Harald Schilly
http://spreadsheets.google.com/ver?key=pCwvGVwSMxTzT6E2xNdo5fA&t=1229242768198000&pt=1229242748198000&diffWidget=true&s=AJVazbV8wTRdqv-uJ-exdnVEO7tqiCikJQ answer below, quote here: = The following behavior is very confusing to me. I define a progr

[sage-support] Error message on installing Sage

2008-12-14 Thread Spencer
I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa Rosa with Intel Core 2 Duo). On installing Sage and starting it up for the first time I get the message: "WARNING! This Sage install was built on a machine that supports instructions that are not available on this computer. Sage

[sage-support] Re: show(P,xmin=0) shows area below Y=0 line

2008-12-14 Thread William Stein
On Sun, Dec 14, 2008 at 2:44 AM, Sand Wraith wrote: > > Hi! > > I want to plot a few lines: > > Line=line([]) > for i in [-10..3]: >Line+=line([[0,0],[1.1+i/10,1.1]]) > > and show it: > > show(Line,xmin=0) > > but output contains area below X axis. :-\ You want show(Line,ymin=0,xmin=0) --

[sage-support] Re: The image of a matrix

2008-12-14 Thread John H Palmieri
On Dec 14, 2:44 am, daveloeffler wrote: > That > > On Dec 13, 6:50 pm, Jason Grout wrote: > > > That sounds the best way.  We'll make kernel_left/right (along with > > left/right_kernel) the global functions, and people can do > > > kernel = left_kernel > > > in their init.sage or at the beginni

[sage-support] Re: The image of a matrix

2008-12-14 Thread adrian
I think the following is also a source of frustration: v=vector([1,2,3]) rm=matrix(v)#This will be a row matrix cm=v.transpose()#This will be a column matrix. What would the convention be for this one? This came up in another discussion: http://groups.google.com/group/sage-support/browse_threa

[sage-support] Re: Lines won't show on coordinate axes

2008-12-14 Thread louie
On Dec 14, 7:16 am, "David Joyner" wrote: > I'm guessing the asex are rendered last, so the lines get overwritten. > You can use > > show(a1+a2+l1+l2+p,axes=False) > > or > > a1=arrow((0,0),(3,1),rgbcolor=(0,1,1)) > a2=arrow((0,0),(-3.5,2.5),rgbcolor=(0,0,1)) > l1=line([(0,0),(-3.5,0)],rgbcolor

[sage-support] Re: Change to a local variable affects the variable outside the program

2008-12-14 Thread Lars Fischer
Hello Giovanni, most of the time it does "the right thing". If you really need call by value, whatever type the argument is, you can (must) copy the argument yourself. The copy module provides the methods copy.copy() and copy.deepcopy() for this situation. With best regards, Lars --~--~

[sage-support] Re: Lines won't show on coordinate axes

2008-12-14 Thread David Joyner
I'm guessing the asex are rendered last, so the lines get overwritten. You can use show(a1+a2+l1+l2+p,axes=False) or a1=arrow((0,0),(3,1),rgbcolor=(0,1,1)) a2=arrow((0,0),(-3.5,2.5),rgbcolor=(0,0,1)) l1=line([(0,0),(-3.5,0)],rgbcolor=(1,0,0), thickness=5) l2=line([(0,0),(0,2.5)],rgbcolor=(0,1,0

[sage-support] Re: Change to a local variable affects the variable outside the program

2008-12-14 Thread giovanni.marche...@ds.unifi.it
Thank you Lars, I had the feeling that this behavior should be something related to Python, but I was impressed by the inconsistency, because in my first example everything worked as (I) intended. So, if this is a feature of Python I have to study it carefully ! Best regards Giovanni On Dec

[sage-support] Re: Change to a local variable affects the variable outside the program

2008-12-14 Thread Lars Fischer
Hello Giovanni, you have hit one of my favorite Python Pitfalls: Python does always call by value, but sometimes it behaves like call by reference . The explanation is hidden in a footnote in the tutorial. Please see "Defining Functions" in "More Control Flow Tools" in the Python Tutorial: http:

[sage-support] Re: The image of a matrix

2008-12-14 Thread mabshoff
On Dec 14, 2:44 am, daveloeffler wrote: > That > > On Dec 13, 6:50 pm, Jason Grout wrote: > > > That sounds the best way.  We'll make kernel_left/right (along with > > left/right_kernel) the global functions, and people can do > > > kernel = left_kernel > > > in their init.sage or at the begin

[sage-support] show(P,xmin=0) shows area below Y=0 line

2008-12-14 Thread Sand Wraith
Hi! I want to plot a few lines: Line=line([]) for i in [-10..3]: Line+=line([[0,0],[1.1+i/10,1.1]]) and show it: show(Line,xmin=0) but output contains area below X axis. :-\ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroup

[sage-support] Re: The image of a matrix

2008-12-14 Thread daveloeffler
That On Dec 13, 6:50 pm, Jason Grout wrote: > That sounds the best way.  We'll make kernel_left/right (along with > left/right_kernel) the global functions, and people can do > > kernel = left_kernel > > in their init.sage or at the beginning of their session, if they want. \begin{devils-advoca

[sage-support] Change to a local variable affects the variable outside the program

2008-12-14 Thread giovanni.marche...@ds.unifi.it
The following behavior is very confusing to me. I define a program def test(a): b=a b = a^2 return b Then if I assign x = 2 and then execute test(x) 4 I get x squared and x unchanged: x 2 However suppose now that I want the same on a single element of a matrix and define