[sage-support] Re: Notebook mode poset element selection question

2012-02-24 Thread Rob Beezer
This may be the list you want (all one one line if it gets cut up here): indices = [f.element.ambient_ray_indices() for l in L.level_sets() [-3:-2] for f in l] And by "address individually" do you mean indices[0], indices[1], etc? Rob On Feb 24, 6:48 pm, Ryan Davis wrote: > Greetings, > > I'm

[sage-support] Notebook mode poset element selection question

2012-02-24 Thread Ryan Davis
Greetings, I'm running notebook mode, looking at acyclic directed graphs which I'm forming from rational polygon fans -> cone_lattice() command -> hasse_diagram() command. One of the things that would be very useful would be a command to select only the elements on a specific level (say, top minu

Re: [sage-support] Re: Question about plot

2012-02-24 Thread Juan Grados
I fix this, thanks by your time 2012/2/24 Juan Grados > Yes in console terminal, when i make this > > p1 = plot(spline(pattersonCpb), > (__builtin__.max(pattersonCpb)[0],__builtin__.min(pattersonCpb)[0]))+points(pattersonCpb) > show(p1) > the plot work fine, but when i make this load a extern fi

Re: [sage-support] Re: Question about plot

2012-02-24 Thread Juan Grados
Yes in console terminal, when i make this p1 = plot(spline(pattersonCpb), (__builtin__.max(pattersonCpb)[0],__builtin__.min(pattersonCpb)[0]))+points(pattersonCpb) show(p1) the plot work fine, but when i make this load a extern file *.sage only i get the points. 2012/2/24 Jason Grout > On 2/2

[sage-support] Re: Question about plot

2012-02-24 Thread Jason Grout
On 2/24/12 2:36 PM, Juan Grados wrote: Jason Grout idea is good for me, but I need empiler several "plots", i after use show(plot1+plot2+...). How do this?. Exactly like you said. Make each plot: plot1=plot(spline(pts), (0,5)) ... and then do show(plot1+plot2+...) Jason -- To post to thi

Re: [sage-support] Question about plot

2012-02-24 Thread Juan Grados
Jason Grout idea is good for me, but I need empiler several "plots", i after use show(plot1+plot2+...). How do this?. 2012/2/24 Dan Drake > On Fri, 24 Feb 2012 at 01:39AM -0200, Juan Grados wrote: > > I need smooth line, (interpolation the points), line(vec) plot line > without > > smoth > > If

[sage-support] Re: CSV file

2012-02-24 Thread Volker Braun
We do get questions about "how to read matrix from csv" quite regularly. Of course its just a few lines of code, but I think it would be nice to have a matrix_from_file('fname.csv') function that imports csv and perhaps others (gnumeric/ooffice/excel). Any volunteers? ;-) On Friday, Februar

Re: [sage-support] Question about QuadraticForm polynomial method.

2012-02-24 Thread Justin C. Walker
On Feb 24, 2012, at 09:49 , John Cremona wrote: > I don't think that is the issue here: you are referring to the debate > between using a,2*b,c as coefficeints rather than a,b,c. But here > *all* the coefficients have been doubled. I haven't looked at this code in detail yet, but I'm pretty sur

[sage-support] Re: CSV file

2012-02-24 Thread Harald Schilly
On Friday, February 24, 2012 11:13:53 AM UTC+1, Chappman wrote: > > and then using a function which opens up the CSV file and utilizes the > entires in the matrix P, from the CSV file. > Is there a method for this? uhm, i'm not sure if you ask about reading or writing. also, your "d" in def

Re: [sage-support] Question about QuadraticForm polynomial method.

2012-02-24 Thread John Cremona
Justin, I don't think that is the issue here: you are referring to the debate between using a,2*b,c as coefficeints rather than a,b,c. But here *all* the coefficients have been doubled. Note that we also have sage: BinaryQF([1,2,3]) x^2 + 2*x*y + 3*y^2 john On 24 February 2012 16:04, Jacob Hi

Re: [sage-support] Question about QuadraticForm polynomial method.

2012-02-24 Thread Justin C. Walker
On Feb 24, 2012, at 08:04 , Jacob Hicks wrote: > When I run: > > sage: q = QuadraticForm(ZZ,2,[3,2,5]) > sage: q.polynomial() > 6*x0^2 + 4*x0*x1 + 10*x1^2 > > I would expect to get half of this result, which is the quadratic form > as a polynomial. The doc tests say this is what the behavior s

[sage-support] Question about QuadraticForm polynomial method.

2012-02-24 Thread Jacob Hicks
When I run: sage: q = QuadraticForm(ZZ,2,[3,2,5]) sage: q.polynomial() 6*x0^2 + 4*x0*x1 + 10*x1^2 I would expect to get half of this result, which is the quadratic form as a polynomial. The doc tests say this is what the behavior should be, but I don't understand why. Is this actually the desir

[sage-support] CSV file

2012-02-24 Thread Chappman
Hi folks, I am having trouble trying to save a matrix P as a CSV file in Sage: Def function(A,D): (sage syntax for creating a matrix P) return P and then using a function which opens up the CSV file and utilizes the entires in the matrix P, from the CSV file. Is there a method for this? Kin