Re: [sage-support] Re: "who" command - Sage Beginner's Guide example

2013-04-24 Thread William Stein
Hi,

I've never heard of this "who" function, but evidently it is in Ipython so
the sage command line automatically has it.  Having never heard of "who", I
had implemented something similar for Sage back in 2004 (!) called
"show_identifiers()", which is like the same function in Magma (which is
called ShowIdentifiers() there).  It is evidently different than "who" in
Ipython, since:

sage:
show_identifiers()
['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'quit']
sage:
R = 250e3
sage:
show_identifiers()
['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'R', 'quit']



With show_identifiers I made it record the actual objects at startup, and
check to see if they change.

The code is here if you want to look at it:

  https://github.com/sagemath/sage/blob/master/src/sage/misc/session.pyx

As show_identifiers() is a normal function call it should also work in the
notebook, scripts etc., rather than only on the interactive command line.

William


On Wed, Apr 24, 2013 at 2:27 PM, João Alberto Ferreira wrote:

> Ok! thank you!
>
>
> On Wednesday, April 24, 2013 6:15:06 AM UTC-3, Volker Braun wrote:
>>
>> "who" prints the newly-defined variables, but R is already defined as the
>> r-system.org interface. You can redefine it as you want, but as far as
>> Python is concerned that just changes a variable but doesn't add a new one.
>>
>>
>>
>> On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira wrote:
>>>
>>> Hi!
>>>
>>> I was executing the examples of the Sage Beginner's Guide book when I
>>> found a curious behavior in Sage.
>>>
>>> Whenever I launch Sage and define the variable
>>>
>>> sage: R = 250e3
>>>
>>> and issue the command
>>>
>>> sage: who
>>>
>>> the output is
>>>
>>> Interactive namespace is empty.
>>>
>>> If I define other variables and issue again the command "who", the other
>>> variables name are returned, but not the "R" variable name.
>>>
>>> Whenever I launch Sage and define a different variable name, like
>>>
>>> sage: j = 250e3
>>>
>>> and issue the command "who", the output is presented correctly as "j".
>>>
>>> Is this a bug or I missed something?
>>>
>>> Cordially,
>>>
>>> João Alberto Ferreira.
>>>
>>> -
>>> ~$ uname -a
>>> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013
>>> i686 athlon i386 GNU/Linux
>>>
>>> sage: version()
>>> 'Sage Version 5.8, Release Date: 2013-03-15'
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread P Purkayastha

The workaround is: use sage's attach() function instead of the python one.

On 04/25/2013 05:53 AM, davidp wrote:

Yes!  This looks right.

Thanks,
Dave

On Wednesday, April 24, 2013 2:30:09 PM UTC-7, John H Palmieri wrote:



On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote:

I just installed Sage 5.8 and am running it from the command
line.  For some reason, it is filling up my directory with what
looks like temporary files, e.g., threshold.sageJmarTS.py
,  threshold.sageR9Gfg9, and on
and on.  (I  attached code contained in a file called
'threshold.sage'.  I get the same behavior from other attached
files.)  These files remain in the directory after i quit Sage.
Could someone tell me what's wrong?

Thanks,
Dave


I think this is the problem reported here:
>. There does not
seem to be a fix right now.

--
John

--
You received this message because you are subscribed to the Google
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: Error in EllipticCuve_from_cubic

2013-04-24 Thread Victor Miller
John, Thanks. I just tried downloading the patch and applying it.  I have 
Sage 5.8.  However, when I did

patch constructor.py trac_3416_fixes.patch

all of the patches were rejected :-(.

Victor

On Wednesday, April 24, 2013 8:47:39 AM UTC-4, John Cremona wrote:
>
> Victor,
>
> The code at trac #3416 implements all this properly in Sage.  It's an 
> ancient ticket but the work on it is new, and it is one of the ones where 
> so many people have wprked on it that there's no-onle left to revview it.  
> That is a pity since Volker did a very nice job on it.  But if you are able 
> to download and apply the patch there then that's an alternative.
>
> John
>
>
> On 24 April 2013 13:39, Volker Braun >wrote:
>
>> I'm pretty sure I removed that in #3416
>>
>>
>> On Wednesday, April 24, 2013 1:27:58 PM UTC+1, Victor Miller wrote:
>>>
>>> E = EllipticCurve_from_cubic(F,(0,**0,1))
 

 Traceback (most recent call last):
   File "", line 1, in 
   File "_sage_input_8.py", line 10, in 
 exec compile(u'open("___code___.py"**,"w").write("# -*- coding: utf-8 
 -*-\\n" + 
 _support_.preparse_worksheet_**cell(base64.b64decode("**RSA9IEVsbGlwdGljQ3VydmVfZnJvbV**9jdWJpYyhGLCgwLDAsMSkp"),**globals())+"\\n");
  execfile(os.path.abspath("___**code___.py"))
   File "", line 1, in 
 
   File 
 "/private/var/folders/zs/**sfhqf6rs4dgdjf89wmqsc644gn**/T/tmpy6Qdo7/___code___.py",
  line 3, in 
 exec compile(u'E = EllipticCurve_from_cubic(F,(_**sage_const_0 
 ,_sage_const_0 ,_sage_const_1 ))
   File "", line 1, in 
 
   File 
 "/Applications/Sage-5.8-OSX-**64bit-10.8.app/Contents/**Resources/sage/local/lib/**python2.7/site-packages/sage/**schemes/elliptic_curves/**constructor.py",
  line 575, in EllipticCurve_from_cubic
 s = magma.eval(cmd)
   File 
 "/Applications/Sage-5.8-OSX-**64bit-10.8.app/Contents/**Resources/sage/local/lib/**python2.7/site-packages/sage/**interfaces/magma.py",
  line 539, in eval
 raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, 
 ans)
 RuntimeError: Error evaluating Magma code.
 IN:aInvariants(MinimalModel(**EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 
 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
 OUT:
 In file 
 "/Users/victorsmiller/.sage/**temp/Victors_MacBook_Pro_2.**local/7371/interface/tmp7444",
  line 1, column 110:
 >> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
  ^
 Runtime error in elt< ... >: No permutation group context in which to 
 create cycle

 


   -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com .
>> To post to this group, send email to sage-s...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread davidp
Yes!  This looks right.

Thanks,
Dave

On Wednesday, April 24, 2013 2:30:09 PM UTC-7, John H Palmieri wrote:
>
>
>
> On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote:
>>
>> I just installed Sage 5.8 and am running it from the command line.  For 
>> some reason, it is filling up my directory with what looks like temporary 
>> files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on and 
>> on.  (I  attached code contained in a file called 'threshold.sage'.  I get 
>> the same behavior from other attached files.)  These files remain in the 
>> directory after i quit Sage.  Could someone tell me what's wrong?
>>
>> Thanks,
>> Dave  
>>
>
> I think this is the problem reported here: <
> http://trac.sagemath.org/sage_trac/ticket/14149>. There does not seem to 
> be a fix right now.
>
> -- 
> John
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread davidp
I have been using attach and load for years, too, with no problem.  I just 
checked by attaching a file containing only a simple function called 
'hello' that prints 'hello world' when called.  I have the same problem.

Thanks,
Dave

On Wednesday, April 24, 2013 2:18:24 PM UTC-7, Dan Drake wrote:
>
> I've used attach and load for years without ever encountering this 
> problem. So there must be something about the code in your 
> threshold.sage file. Without seeing it, it's not likely we can help you. 
>
> On Wed, 24 Apr 2013 at 10:57AM -0700, davidp wrote: 
> > I think this problem has to do with attaching a file.  I noticed that 
> > "attach" has been deprecated.  Using either 'attach' or '%attach' seems 
> to 
> > cause the proliferation of extra files.  The 'load' command or 
> '%runfile' 
> > does not seem to have this behavior.  The problem with the 'attach' 
> command 
> > seems like a bug to me.  Shouldn't these extra files be stored in some 
> tmp 
> > file in the sage directory that get erased at the end of the session, or 
> > something like that? 
> > 
> > Thanks, 
> > Dave 
> > 
> > On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote: 
> > > 
> > > I just installed Sage 5.8 and am running it from the command line. 
>  For 
> > > some reason, it is filling up my directory with what looks like 
> temporary 
> > > files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on 
> and 
> > > on.  (I  attached code contained in a file called 'threshold.sage'.  I 
> get 
> > > the same behavior from other attached files.)  These files remain in 
> the 
> > > directory after i quit Sage.  Could someone tell me what's wrong? 
> > > 
> > > Thanks, 
> > > Dave   
> > > 
> > 
>
>
> Dan 
>
> -- 
> ---  Dan Drake 
> -  http://math.pugetsound.edu/~ddrake 
> --- 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread John H Palmieri


On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote:
>
> I just installed Sage 5.8 and am running it from the command line.  For 
> some reason, it is filling up my directory with what looks like temporary 
> files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on and 
> on.  (I  attached code contained in a file called 'threshold.sage'.  I get 
> the same behavior from other attached files.)  These files remain in the 
> directory after i quit Sage.  Could someone tell me what's wrong?
>
> Thanks,
> Dave  
>

I think this is the problem reported here: 
. There does not seem to 
be a fix right now.

-- 
John
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: "who" command - Sage Beginner's Guide example

2013-04-24 Thread João Alberto Ferreira
Ok! thank you!

On Wednesday, April 24, 2013 6:15:06 AM UTC-3, Volker Braun wrote:
>
> "who" prints the newly-defined variables, but R is already defined as the 
> r-system.org interface. You can redefine it as you want, but as far as 
> Python is concerned that just changes a variable but doesn't add a new one.
>
>
>
> On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira wrote:
>>
>> Hi! 
>>
>> I was executing the examples of the Sage Beginner's Guide book when I 
>> found a curious behavior in Sage. 
>>
>> Whenever I launch Sage and define the variable 
>>
>> sage: R = 250e3 
>>
>> and issue the command 
>>
>> sage: who 
>>
>> the output is 
>>
>> Interactive namespace is empty. 
>>
>> If I define other variables and issue again the command "who", the other 
>> variables name are returned, but not the "R" variable name. 
>>
>> Whenever I launch Sage and define a different variable name, like 
>>
>> sage: j = 250e3 
>>
>> and issue the command "who", the output is presented correctly as "j". 
>>
>> Is this a bug or I missed something? 
>>
>> Cordially, 
>>
>> João Alberto Ferreira. 
>>
>> - 
>> ~$ uname -a 
>> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 
>> i686 athlon i386 GNU/Linux 
>>
>> sage: version() 
>> 'Sage Version 5.8, Release Date: 2013-03-15'
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread Dan Drake
I've used attach and load for years without ever encountering this
problem. So there must be something about the code in your
threshold.sage file. Without seeing it, it's not likely we can help you.

On Wed, 24 Apr 2013 at 10:57AM -0700, davidp wrote:
> I think this problem has to do with attaching a file.  I noticed that 
> "attach" has been deprecated.  Using either 'attach' or '%attach' seems to 
> cause the proliferation of extra files.  The 'load' command or '%runfile' 
> does not seem to have this behavior.  The problem with the 'attach' command 
> seems like a bug to me.  Shouldn't these extra files be stored in some tmp 
> file in the sage directory that get erased at the end of the session, or 
> something like that?
> 
> Thanks,
> Dave
> 
> On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote:
> >
> > I just installed Sage 5.8 and am running it from the command line.  For 
> > some reason, it is filling up my directory with what looks like temporary 
> > files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on and 
> > on.  (I  attached code contained in a file called 'threshold.sage'.  I get 
> > the same behavior from other attached files.)  These files remain in the 
> > directory after i quit Sage.  Could someone tell me what's wrong?
> >
> > Thanks,
> > Dave  
> >
> 


Dan

--
---  Dan Drake
-  http://math.pugetsound.edu/~ddrake
---


signature.asc
Description: Digital signature


Re: [sage-support] Re: No DPI information in PNG files (parametric_plot3d)

2013-04-24 Thread Dan Drake
On Wed, 24 Apr 2013 at 10:31PM +0400, LRN wrote:
> As an experiment, try creating a simple image (say, a rectangle of
> 100x100 pixels), then save it as png, create multiple copies and give
> them different DPI values in Gimp.

The key idea, it seems to me, is that *I* am the one giving the image
different DPI values. The computer cannot, without input from me, figure
out what I want.

Discussions like this are part of why I would like vector-based output
for our 3D plotting.

Dan

--
---  Dan Drake
-  http://math.pugetsound.edu/~ddrake
---


signature.asc
Description: Digital signature


Re: [sage-support] Re: No DPI information in PNG files (parametric_plot3d)

2013-04-24 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 24.04.2013 20:00, Dan Drake wrote:
> On Wed, 24 Apr 2013 at 06:44AM -0700, LRN wrote:
>> That said, i've noticed that you're using [scale=.4]. How would 
>> it look without scale=.4? The point is that DPI info should
>> allow typesetter to guess image size correctly, and it should
>> look OK without scaling.
> 
> Let me admit my ignorance here: for computer-generated raster 
> graphics, I don't understand what DPI might even *mean*. Let's say 
> I use Sage to make an images that 500 pixels by 500 pixels. To 
> assign a meaningful dots-per-inch value, you need to have an idea 
> of how large the image should appear. That seems ill-defined to
> me: the monitor I'm using right now is around 90 dpi; my Nexus S 
> smartphone is 233 dpi. (I'm assume "dot" = "pixel".) How can Sage 
> know the properties of the physical display, or what the user 
> wants? Maybe there's some standard or mechanism that I don't know 
> about, but it seems like this is something we can't solve for the 
> user.
When image is typeset (by LaTeX) or printed, dpi value is used to
infer image's physical size on the page (page's physical size is
known, obviously - it's A4, for example).

As an experiment, try creating a simple image (say, a rectangle of
100x100 pixels), then save it as png, create multiple copies and give
them different DPI values in Gimp. Then print each file (without
stretching or fitting to page).

This has nothing with your screen's ppi.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJReCUEAAoJEOs4Jb6SI2CwdSAIANsLnY2oWH4umiBKzanugcg+
NQDx04NdKWQVVh94GIEn0M5N/IVHjgBHSGzYJmvZvWF707T6Z8Sa+Ca7y3JsFhM0
dSy2kU0PP90oofuFZ5EsurFGpWdWpvYJgEHh/FdmcDaorSwQ8JZpe26dG6e+zocM
FRQZq9zi1Jcf+afFc5mH0ebm7daPsD+YuG1LWQVd988tFd9We3yKNvT1Cxfo1r9o
ZdjucE7tcNW4NqdiIMuQNgSqpDN8GNdnn05OzwcmdIZi9dXs8LiYxIb5AKGkicZr
IlvqdbvV7U4C8nEw5pHDGydbKygZ/z804dwA855+nxqN0ZbkHi+amABja0LhAdE=
=xBxG
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: sage is filling up my directory with files

2013-04-24 Thread davidp
I think this problem has to do with attaching a file.  I noticed that 
"attach" has been deprecated.  Using either 'attach' or '%attach' seems to 
cause the proliferation of extra files.  The 'load' command or '%runfile' 
does not seem to have this behavior.  The problem with the 'attach' command 
seems like a bug to me.  Shouldn't these extra files be stored in some tmp 
file in the sage directory that get erased at the end of the session, or 
something like that?

Thanks,
Dave

On Wednesday, April 24, 2013 8:53:56 AM UTC-7, davidp wrote:
>
> I just installed Sage 5.8 and am running it from the command line.  For 
> some reason, it is filling up my directory with what looks like temporary 
> files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on and 
> on.  (I  attached code contained in a file called 'threshold.sage'.  I get 
> the same behavior from other attached files.)  These files remain in the 
> directory after i quit Sage.  Could someone tell me what's wrong?
>
> Thanks,
> Dave  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: No DPI information in PNG files (parametric_plot3d)

2013-04-24 Thread Dan Drake
On Wed, 24 Apr 2013 at 06:44AM -0700, LRN wrote:
> That said, i've noticed that you're using [scale=.4]. How would it look 
> without scale=.4? The point is that DPI info should allow typesetter to 
> guess image size correctly, and it should look OK without scaling.

Let me admit my ignorance here: for computer-generated raster graphics,
I don't understand what DPI might even *mean*. Let's say I use Sage to
make an images that 500 pixels by 500 pixels. To assign a meaningful
dots-per-inch value, you need to have an idea of how large the image
should appear. That seems ill-defined to me: the monitor I'm using right
now is around 90 dpi; my Nexus S smartphone is 233 dpi. (I'm assume
"dot" = "pixel".) How can Sage know the properties of the physical
display, or what the user wants? Maybe there's some standard or
mechanism that I don't know about, but it seems like this is something
we can't solve for the user.

Dan

--
---  Dan Drake
-  http://math.pugetsound.edu/~ddrake
---


signature.asc
Description: Digital signature


[sage-support] sage is filling up my directory with files

2013-04-24 Thread davidp
I just installed Sage 5.8 and am running it from the command line.  For 
some reason, it is filling up my directory with what looks like temporary 
files, e.g., threshold.sageJmarTS.py,  threshold.sageR9Gfg9, and on and 
on.  (I  attached code contained in a file called 'threshold.sage'.  I get 
the same behavior from other attached files.)  These files remain in the 
directory after i quit Sage.  Could someone tell me what's wrong?

Thanks,
Dave  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Short and localized measurement units names. Also typesetting

2013-04-24 Thread Dan Drake
On Wed, 24 Apr 2013 at 06:09PM +0400, LRN wrote:
> So, i can do things like:
> M = units.length.meter
> S = units.time.second
> speed = 2 * M/S
> speed
> 
> and get:
> 2*meter/second
> 
> or (in typesetting mode):
> \frac{2 \, \mbox{meter}}{\mbox{second}}
> 
> I have three problems with this.

I would recommend trying to use the LaTeX package SIunitx [1], which
works very hard to typeset units properly and supports localization. I
haven't thought of a nice way to get that to interact with SageTeX --
I've always just taken the number and used SIunitx to add the units.

I'd like to see units typeset themselves with SIunitx, but I'm not sure
how that would work with the notebook and MathJax.

Dan


References:
[1]  http://ctan.org/pkg/siunitx

--
---  Dan Drake
-  http://math.pugetsound.edu/~ddrake
---


signature.asc
Description: Digital signature


[sage-support] Re: No DPI information in PNG files (parametric_plot3d)

2013-04-24 Thread kcrisman


On Wednesday, April 24, 2013 9:44:47 AM UTC-4, LRN wrote:
>
>
> On Tuesday, April 23, 2013 6:15:00 PM UTC+4, kcrisman wrote:
>>
>>
>>
>> On Tuesday, April 23, 2013 6:15:23 AM UTC-4, LRN wrote:
>>>
>>> -BEGIN PGP SIGNED MESSAGE- 
>>> Hash: SHA1 
>>>
>>> I've attached a sample tex file. 
>>>
>>>
>> You are totally cutting-edge!  But remember, even with imagemagick, "This 
>> option is not intended to produce good graphics, but to allow you to see 
>> your graphics when you use latex and DVI files while writing your 
>> document." (http://cdn.bitbucket.org/ddrake/sagetex/downloads/sagetex.pdf
>> )
>>
>> Apparently SageTeX ignores most of the options, even the viewer='tachyon' 
>> one.   But note that later on in the manual it says "you can always do 
>> things manually".  This seems to work for me - looks ok, see attached png.
>>
>> \begin{sagesilent}
>> u, v = var('u,v')
>> fx = (3+sin(v)+cos(u))*cos(2*v)
>> fy = (3+sin(v)+cos(u))*sin(2*v)
>> fz = sin(u)+2*cos(v)
>> x = parametric_plot3d([fx, fy, fz], (u, 0, 2*pi), (v, 0, 
>> 2*pi),frame=False,dpi=300,viewer='tachyon')
>> x.save(filename='ClassNotesPics/myspecialfile.png')
>> \end{sagesilent}
>>
>> This 3d plot looks okay:
>>
>> \begin{center}
>> \includegraphics[scale=.4]{ClassNotesPics/myspecialfile.png}
>> \end{center}
>>
>>
>> OK, i'll use the manual mode (save into png -> includegraphics).
> That said, i've noticed that you're using [scale=.4]. How would it look 
> without scale=.4? The point is that DPI info should allow typesetter to 
> guess image size correctly, and it should look OK without scaling. Or not. 
> After all, default image resolution does not seem to have any relation to 
> dpi=..., so high dpi means "scale down", while low dpi means "scale up", 
> but increasing/decreasing resolution (using figsize) will throw that 
> scaling off...Damn. OK, so the right way is to specify dpi that is high 
> enough for "printing" (that would be 300), then increase image resolution 
> with figsize until the image is large enough. Right?
>

That I do not know.  I only put the scale in there because I copied from 
something else in one of my files.   I nearly always have to scale down 
from images I find to put them in class notes or other documents. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Short and localized measurement units names. Also typesetting

2013-04-24 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

So, i can do things like:
M = units.length.meter
S = units.time.second
speed = 2 * M/S
speed

and get:
2*meter/second

or (in typesetting mode):
\frac{2 \, \mbox{meter}}{\mbox{second}}

I have three problems with this.
1) Sage prints full names - "meter" instead of "m", and "second"
instead of "s".
There's a "dimpy" package that kind of fixes this, but i haven't been
able to coerce it to print correct units in more complex cases (like,
{kJ} over {kG cdot C}).

2) Units are in latin, and i have not been able to find a way to
localize their displaystrings. Dimpy does have set_dispname, but that
doesn't really work well with non-latin strings.

3) Back to typesetting - the value is typeset with 2 in numerator.
That is not how i usually want things to look, usually 2 is separate
and symbolics are in numerator and denominator.

Now, i can easily write anything in LaTeX, and use Sage only for
number crunching (without units of measurement; using symbolics only
for their original, intended purpose), but that means that i will have
type a lot of LaTeX code (one swath of code for each occurrence of a
unit; though i might be able to come up with a shorthand macro for the
most common units) - code that Sage could have been able to generate
automagically. Is that really the only way?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRd+emAAoJEOs4Jb6SI2CwaE4H/0vWXk7lOGeni2BXWYZxhZzd
vXtSzu0Jkn+g7kK5d2cUFBjsj6k/s9sYf1tRE58YmnuW5vG0+bjrbKPFmTtBuxq4
bmOlk1JHeX/dZQX+Gfsa0vYy72uOhtum9lrHsTd1esMWYTyKBg+iTZb3KqxtVBas
Xqvs8PSBjHy2oU3GmqIC7RtyTP4mbcqF6Dlj0scnxGSGN0TnM4CuhZ81w99RmZDS
r1qYq1PM1I6CmK8AM+NQSBFQqbi/UEjwoIU+7D4emtWmKGSuf2xj7uDSekp00LVu
+agdBYIcsZgaD3gQksCa0WM7YAAR1EMmX236AGiZx+tYFe5yUFZNNtCx4fG/UbA=
=K5cd
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: No DPI information in PNG files (parametric_plot3d)

2013-04-24 Thread LRN

On Tuesday, April 23, 2013 6:15:00 PM UTC+4, kcrisman wrote:
>
>
>
> On Tuesday, April 23, 2013 6:15:23 AM UTC-4, LRN wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE- 
>> Hash: SHA1 
>>
>> I've attached a sample tex file. 
>>
>>
> You are totally cutting-edge!  But remember, even with imagemagick, "This 
> option is not intended to produce good graphics, but to allow you to see 
> your graphics when you use latex and DVI files while writing your 
> document." (http://cdn.bitbucket.org/ddrake/sagetex/downloads/sagetex.pdf)
>
> Apparently SageTeX ignores most of the options, even the viewer='tachyon' 
> one.   But note that later on in the manual it says "you can always do 
> things manually".  This seems to work for me - looks ok, see attached png.
>
> \begin{sagesilent}
> u, v = var('u,v')
> fx = (3+sin(v)+cos(u))*cos(2*v)
> fy = (3+sin(v)+cos(u))*sin(2*v)
> fz = sin(u)+2*cos(v)
> x = parametric_plot3d([fx, fy, fz], (u, 0, 2*pi), (v, 0, 
> 2*pi),frame=False,dpi=300,viewer='tachyon')
> x.save(filename='ClassNotesPics/myspecialfile.png')
> \end{sagesilent}
>
> This 3d plot looks okay:
>
> \begin{center}
> \includegraphics[scale=.4]{ClassNotesPics/myspecialfile.png}
> \end{center}
>
>
> OK, i'll use the manual mode (save into png -> includegraphics).
That said, i've noticed that you're using [scale=.4]. How would it look 
without scale=.4? The point is that DPI info should allow typesetter to 
guess image size correctly, and it should look OK without scaling. Or not. 
After all, default image resolution does not seem to have any relation to 
dpi=..., so high dpi means "scale down", while low dpi means "scale up", 
but increasing/decreasing resolution (using figsize) will throw that 
scaling off...Damn. OK, so the right way is to specify dpi that is high 
enough for "printing" (that would be 300), then increase image resolution 
with figsize until the image is large enough. Right?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: Error in EllipticCuve_from_cubic

2013-04-24 Thread John Cremona
Victor,

The code at trac #3416 implements all this properly in Sage.  It's an
ancient ticket but the work on it is new, and it is one of the ones where
so many people have wprked on it that there's no-onle left to revview it.
That is a pity since Volker did a very nice job on it.  But if you are able
to download and apply the patch there then that's an alternative.

John


On 24 April 2013 13:39, Volker Braun  wrote:

> I'm pretty sure I removed that in #3416
>
>
> On Wednesday, April 24, 2013 1:27:58 PM UTC+1, Victor Miller wrote:
>>
>> E = EllipticCurve_from_cubic(F,(0,**0,1))
>>>
>>>
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File "_sage_input_8.py", line 10, in 
>>> exec compile(u'open("___code___.py"**,"w").write("# -*- coding: utf-8 
>>> -*-\\n" + 
>>> _support_.preparse_worksheet_**cell(base64.b64decode("**RSA9IEVsbGlwdGljQ3VydmVfZnJvbV**9jdWJpYyhGLCgwLDAsMSkp"),**globals())+"\\n");
>>>  execfile(os.path.abspath("___**code___.py"))
>>>   File "", line 1, in 
>>>
>>>   File 
>>> "/private/var/folders/zs/**sfhqf6rs4dgdjf89wmqsc644gn**/T/tmpy6Qdo7/___code___.py",
>>>  line 3, in 
>>> exec compile(u'E = EllipticCurve_from_cubic(F,(_**sage_const_0 
>>> ,_sage_const_0 ,_sage_const_1 ))
>>>   File "", line 1, in 
>>>
>>>   File 
>>> "/Applications/Sage-5.8-OSX-**64bit-10.8.app/Contents/**Resources/sage/local/lib/**python2.7/site-packages/sage/**schemes/elliptic_curves/**constructor.py",
>>>  line 575, in EllipticCurve_from_cubic
>>> s = magma.eval(cmd)
>>>   File 
>>> "/Applications/Sage-5.8-OSX-**64bit-10.8.app/Contents/**Resources/sage/local/lib/**python2.7/site-packages/sage/**interfaces/magma.py",
>>>  line 539, in eval
>>> raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, 
>>> ans)
>>> RuntimeError: Error evaluating Magma code.
>>> IN:aInvariants(MinimalModel(**EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 + 
>>> 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>>> OUT:
>>> In file 
>>> "/Users/victorsmiller/.sage/**temp/Victors_MacBook_Pro_2.**local/7371/interface/tmp7444",
>>>  line 1, column 110:
>>> >> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>>>  ^
>>> Runtime error in elt< ... >: No permutation group context in which to 
>>> create cycle
>>>
>>>
>>>
>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Error in EllipticCuve_from_cubic

2013-04-24 Thread Volker Braun
I'm pretty sure I removed that in #3416

On Wednesday, April 24, 2013 1:27:58 PM UTC+1, Victor Miller wrote:
>
> E = EllipticCurve_from_cubic(F,(0,0,1))
>>
>>
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "_sage_input_8.py", line 10, in 
>> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
>> -*-\\n" + 
>> _support_.preparse_worksheet_cell(base64.b64decode("RSA9IEVsbGlwdGljQ3VydmVfZnJvbV9jdWJpYyhGLCgwLDAsMSkp"),globals())+"\\n");
>>  execfile(os.path.abspath("___code___.py"))
>>   File "", line 1, in 
>> 
>>   File 
>> "/private/var/folders/zs/sfhqf6rs4dgdjf89wmqsc644gn/T/tmpy6Qdo7/___code___.py",
>>  line 3, in 
>> exec compile(u'E = EllipticCurve_from_cubic(F,(_sage_const_0 
>> ,_sage_const_0 ,_sage_const_1 ))
>>   File "", line 1, in 
>> 
>>   File 
>> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/constructor.py",
>>  line 575, in EllipticCurve_from_cubic
>> s = magma.eval(cmd)
>>   File 
>> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/magma.py",
>>  line 539, in eval
>> raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, 
>> ans)
>> RuntimeError: Error evaluating Magma code.
>> IN:aInvariants(MinimalModel(EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 + 
>> 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>> OUT:
>> In file 
>> "/Users/victorsmiller/.sage/temp/Victors_MacBook_Pro_2.local/7371/interface/tmp7444",
>>  line 1, column 110:
>> >> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>>  ^
>> Runtime error in elt< ... >: No permutation group context in which to create 
>> cycle
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Error in EllipticCuve_from_cubic

2013-04-24 Thread Victor Miller
One more thing: it would be really nice (required?) if 
Elliptic_curve_from_cubic would return the morphism that it found (and 
perhaps an inverse).

Victor

On Wednesday, April 24, 2013 8:22:33 AM UTC-4, Victor Miller wrote:
>
> In Sage 5.8 on a mac.  I have a functioning (and licensed) magma on my 
> computer, and apparently sage is trying to call it.
>
> Victor
>
> R. = QQ[]
> F = x^3 + 2*x*(y^2 + y*z + z^2) + y*z*(y + z)
> F(0,0,1) 
> > 0
> E = EllipticCurve_from_cubic(F,(0,0,1))
>
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_8.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
> -*-\\n" + 
> _support_.preparse_worksheet_cell(base64.b64decode("RSA9IEVsbGlwdGljQ3VydmVfZnJvbV9jdWJpYyhGLCgwLDAsMSkp"),globals())+"\\n");
>  execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
> 
>   File 
> "/private/var/folders/zs/sfhqf6rs4dgdjf89wmqsc644gn/T/tmpy6Qdo7/___code___.py",
>  line 3, in 
> exec compile(u'E = EllipticCurve_from_cubic(F,(_sage_const_0 
> ,_sage_const_0 ,_sage_const_1 ))
>   File "", line 1, in 
> 
>   File 
> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/constructor.py",
>  line 575, in EllipticCurve_from_cubic
> s = magma.eval(cmd)
>   File 
> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/magma.py",
>  line 539, in eval
> raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, ans)
> RuntimeError: Error evaluating Magma code.
> IN:aInvariants(MinimalModel(EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 + 
> 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
> OUT:
> In file 
> "/Users/victorsmiller/.sage/temp/Victors_MacBook_Pro_2.local/7371/interface/tmp7444",
>  line 1, column 110:
> >> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>  ^
> Runtime error in elt< ... >: No permutation group context in which to create 
> cycle
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Error in EllipticCuve_from_cubic

2013-04-24 Thread Victor Miller
Ah, I just found that I should specify the point as a list and not a tuple. 
 Now it works.  However, the error is sure weird and indecipherable!

Victor

On Wednesday, April 24, 2013 8:22:33 AM UTC-4, Victor Miller wrote:
>
> In Sage 5.8 on a mac.  I have a functioning (and licensed) magma on my 
> computer, and apparently sage is trying to call it.
>
> Victor
>
> R. = QQ[]
> F = x^3 + 2*x*(y^2 + y*z + z^2) + y*z*(y + z)
> F(0,0,1) 
> > 0
> E = EllipticCurve_from_cubic(F,(0,0,1))
>
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_8.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
> -*-\\n" + 
> _support_.preparse_worksheet_cell(base64.b64decode("RSA9IEVsbGlwdGljQ3VydmVfZnJvbV9jdWJpYyhGLCgwLDAsMSkp"),globals())+"\\n");
>  execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
> 
>   File 
> "/private/var/folders/zs/sfhqf6rs4dgdjf89wmqsc644gn/T/tmpy6Qdo7/___code___.py",
>  line 3, in 
> exec compile(u'E = EllipticCurve_from_cubic(F,(_sage_const_0 
> ,_sage_const_0 ,_sage_const_1 ))
>   File "", line 1, in 
> 
>   File 
> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/constructor.py",
>  line 575, in EllipticCurve_from_cubic
> s = magma.eval(cmd)
>   File 
> "/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/magma.py",
>  line 539, in eval
> raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, ans)
> RuntimeError: Error evaluating Magma code.
> IN:aInvariants(MinimalModel(EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 + 
> 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
> OUT:
> In file 
> "/Users/victorsmiller/.sage/temp/Victors_MacBook_Pro_2.local/7371/interface/tmp7444",
>  line 1, column 110:
> >> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
>  ^
> Runtime error in elt< ... >: No permutation group context in which to create 
> cycle
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Error in EllipticCuve_from_cubic

2013-04-24 Thread Victor Miller
In Sage 5.8 on a mac.  I have a functioning (and licensed) magma on my 
computer, and apparently sage is trying to call it.

Victor

R. = QQ[]
F = x^3 + 2*x*(y^2 + y*z + z^2) + y*z*(y + z)
F(0,0,1) 
> 0
E = EllipticCurve_from_cubic(F,(0,0,1))
   

Traceback (most recent call last):
  File "", line 1, in 
  File "_sage_input_8.py", line 10, in 
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" 
+ 
_support_.preparse_worksheet_cell(base64.b64decode("RSA9IEVsbGlwdGljQ3VydmVfZnJvbV9jdWJpYyhGLCgwLDAsMSkp"),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
  File "", line 1, in 

  File 
"/private/var/folders/zs/sfhqf6rs4dgdjf89wmqsc644gn/T/tmpy6Qdo7/___code___.py",
 line 3, in 
exec compile(u'E = EllipticCurve_from_cubic(F,(_sage_const_0 ,_sage_const_0 
,_sage_const_1 ))
  File "", line 1, in 

  File 
"/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/constructor.py",
 line 575, in EllipticCurve_from_cubic
s = magma.eval(cmd)
  File 
"/Applications/Sage-5.8-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/magma.py",
 line 539, in eval
raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, ans)
RuntimeError: Error evaluating Magma code.
IN:aInvariants(MinimalModel(EllipticCurve(Curve(Scheme(P, x^3 + 2*x*y^2 + 
2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
OUT:
In file 
"/Users/victorsmiller/.sage/temp/Victors_MacBook_Pro_2.local/7371/interface/tmp7444",
 line 1, column 110:
>> x^3 + 2*x*y^2 + 2*x*y*z + y^2*z + 2*x*z^2 + y*z^2)),P!(0, 0, 1;
 ^
Runtime error in elt< ... >: No permutation group context in which to create 
cycle

   


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: "who" command - Sage Beginner's Guide example

2013-04-24 Thread Volker Braun
"who" prints the newly-defined variables, but R is already defined as the 
r-system.org interface. You can redefine it as you want, but as far as 
Python is concerned that just changes a variable but doesn't add a new one.



On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira wrote:
>
> Hi! 
>
> I was executing the examples of the Sage Beginner's Guide book when I 
> found a curious behavior in Sage. 
>
> Whenever I launch Sage and define the variable 
>
> sage: R = 250e3 
>
> and issue the command 
>
> sage: who 
>
> the output is 
>
> Interactive namespace is empty. 
>
> If I define other variables and issue again the command "who", the other 
> variables name are returned, but not the "R" variable name. 
>
> Whenever I launch Sage and define a different variable name, like 
>
> sage: j = 250e3 
>
> and issue the command "who", the output is presented correctly as "j". 
>
> Is this a bug or I missed something? 
>
> Cordially, 
>
> João Alberto Ferreira. 
>
> - 
> ~$ uname -a 
> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 
> i686 athlon i386 GNU/Linux 
>
> sage: version() 
> 'Sage Version 5.8, Release Date: 2013-03-15'

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] "who" command - Sage Beginner's Guide example

2013-04-24 Thread João Alberto Ferreira
Hi!

I was executing the examples of the Sage Beginner's Guide book when I found a 
curious behavior in Sage.

Whenever I launch Sage and define the variable

sage: R = 250e3

and issue the command

sage: who

the output is

Interactive namespace is empty.

If I define other variables and issue again the command "who", the other 
variables name are returned, but not the "R" variable name.

Whenever I launch Sage and define a different variable name, like

sage: j = 250e3

and issue the command "who", the output is presented correctly as "j".

Is this a bug or I missed something?

Cordially,

João Alberto Ferreira.

-
~$ uname -a
Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 i686 
athlon i386 GNU/Linux

sage: version()
'Sage Version 5.8, Release Date: 2013-03-15'

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.