[sage-support] Re: Asking whether a number is in QQ or not

2011-09-15 Thread Alex Lara
Thank you to all of you! On Sep 15, 12:59 pm, Simon King wrote: > PS: > > >    sage: cm.explain(QQ, b.parent()) > > I forgot to copy-and-paste the definition of "cm". It was: > >   sage: from sage.structure.element import get_coercion_model >   sage: cm = get_coercion_model() > > Cheers, > Simon

Re: [sage-support] Re: plot3d with adaptive=True fails

2011-09-15 Thread Dan Drake
On Thu, 15 Sep 2011 at 06:40AM -0700, kcrisman wrote: > On Sep 15, 9:08 am, Dan Drake wrote: > > This is strange: > > > > x, y =var('x y') > > plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2), > > adaptive=True) > > > > fails with "ValueError: cannot convert float NaN to i

[sage-support] Re: Asking whether a number is in QQ or not

2011-09-15 Thread Simon King
PS: >sage: cm.explain(QQ, b.parent()) I forgot to copy-and-paste the definition of "cm". It was: sage: from sage.structure.element import get_coercion_model sage: cm = get_coercion_model() Cheers, Simon -- To post to this group, send email to sage-support@googlegroups.com To unsubscri

[sage-support] [ANN} OpenOpt, FuncDesigner, DerApproximator, SpaceFuncs release 0.36

2011-09-15 Thread dmitrey
Hi all, new release of our free soft (OpenOpt, FuncDesigner, DerApproximator, SpaceFuncs) v. 0.36 is out: OpenOpt: Now solver interalg can handle all types of constraints and integration problems Some minor improvements and code cleanup FuncDesigner: Interval analysis now can involv

[sage-support] Re: plot3d with adaptive=True fails

2011-09-15 Thread achrzesz
Also: sage: T = Cylindrical('height', ['radius', 'azimuth']) sage: r, theta, z = var('r theta z') sage: plot3d(r*sin(1/r), (r, 0.0, 0.2), (theta, 0, 2*pi), transformation=T,adaptive=True) Andrzej Chrzeszczyk -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe f

Re: [sage-support] Re: plot3d with adaptive=True fails

2011-09-15 Thread Rajeev Singh
On Thu, Sep 15, 2011 at 7:10 PM, kcrisman wrote: > > > On Sep 15, 9:08 am, Dan Drake wrote: >> This is strange: >> >> x, y =var('x y') >> plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2), >> adaptive=True) >> >> fails with "ValueError: cannot convert float NaN to integer"

[sage-support] Re: plot3d with adaptive=True fails

2011-09-15 Thread kcrisman
On Sep 15, 9:08 am, Dan Drake wrote: > This is strange: > > x, y =var('x y') > plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2), > adaptive=True) > > fails with "ValueError: cannot convert float NaN to integer". Something > goes wrong when it partitions up the domain, pr

Re: [sage-support] loading a series of files inside a loop

2011-09-15 Thread Rajeev Singh
On Thu, Sep 15, 2011 at 4:56 PM, Andrew Francis wrote: > Hi all, > > I'm new to this group; thanks for having me. > > I have generated a large number of text files (several lots of 81 > files) with the intention of reading them back into another sage > program (via the command line).  The text fil

[sage-support] plot3d with adaptive=True fails

2011-09-15 Thread Dan Drake
This is strange: x, y =var('x y') plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2), adaptive=True) fails with "ValueError: cannot convert float NaN to integer". Something goes wrong when it partitions up the domain, probably when it looks at the origin. Is there a way to

Re: [sage-support] loading a series of files inside a loop

2011-09-15 Thread Rajeev Singh
On Thu, Sep 15, 2011 at 6:23 PM, Rajeev Singh wrote: > On Thu, Sep 15, 2011 at 4:56 PM, Andrew Francis wrote: >> Hi all, >> >> I'm new to this group; thanks for having me. >> >> I have generated a large number of text files (several lots of 81 >> files) with the intention of reading them back int

[sage-support] Re: Asking whether a number is in QQ or not

2011-09-15 Thread Simon King
Hi Volker, On 15 Sep., 11:45, Volker Braun wrote: > b in QQ is (or should be) equivalent to QQ(b) not throwing an error. No, that's incorrect. It should be (and is) equivalent to QQ(b)==b returning True. QQ(b) is just a conversion. You can convert any element of a finite prime field into QQ:

[sage-support] loading a series of files inside a loop

2011-09-15 Thread Andrew Francis
Hi all, I'm new to this group; thanks for having me. I have generated a large number of text files (several lots of 81 files) with the intention of reading them back into another sage program (via the command line). The text filenames were generated by the line outputfilename="Dropbox/simda

[sage-support] Re: Bug in pari/gp or sage? Any fixes?

2011-09-15 Thread Amir
Hi I have the same problem. I am using sage 4.6 installed on windows vista. This is part of code I have written in sage. Is there anyway I can catch this error and make an exception? Thanks On Sep 13, 9:49 am, vasu wrote: > Hi > Thanks for the reply. > I am also using Sage 4.7.1 installed

Re: [sage-support] gsl in sage outside of notebook

2011-09-15 Thread Rajeev Singh
On Thu, Sep 15, 2011 at 12:07 PM, Robert Bradshaw wrote: > On Wed, Sep 14, 2011 at 2:31 AM, Rajeev Singh wrote: >> Hi, >> >> The following examples compiles from the notebook >> >> %cython >> cimport sage.gsl.ode >> import sage.gsl.ode >> include 'gsl.pxi' >> >> cdef class van_der_pol(sage.gsl.od

[sage-support] Re: for loop in 3d image

2011-09-15 Thread achrzesz
A colon is missing after range(20). The following version works for me: (but the indentation in this post may be broken) x,y,z,t = var('x,y,z,t') P = implicit_plot3d(x^2 +y^2 -z^2 ==1, (x,-3.2,3.2),(y,-3.2,3.2), (z,-3,3),opacity=.2,color='blue') for k in range(20): P += parametric_plot3d([cos(

[sage-support] Re: Asking whether a number is in QQ or not

2011-09-15 Thread Volker Braun
b in QQ is (or should be) equivalent to QQ(b) not throwing an error. But if that fails, it only means that Sage can't convert it to a rational directly, it is perfectly possible that after a series of (computationally expensive) steps one could transform b into a rational. But if we would always

[sage-support] Re: complex parts

2011-09-15 Thread achrzesz
> For trivial cases, yeah, but consider > >         parametric_plot((f(t-0.5j).real, f(t-0.5j).imag), (t,tmin,tmax)) > >         parametric_plot(ReIm(f(t-0.5j)), (t,tmin,tmax)) > > -- For example: sage: f(z)=[z.real(),z.imag()] sage: t=var('t') sage: parametric_plot(f(exp(I*(t-5*I))),(t,0,2*pi))

Re: [sage-support] complex parts

2011-09-15 Thread Anton Sherwood
On 2011-9-14 23:35, Robert Bradshaw wrote: ... Otherwise, z.real, z.imag is probably going to be as fast as you can get, and there's no need to define a function, you could just write sage: a = complex(3,4) sage: x, y = a.real, a.imag For trivial cases, yeah, but consider parametric_p