set() display

47 views
Skip to first unread message

valer...@gmail.com

unread,
May 7, 2017, 9:49:08 AM5/7/17
to sage-cloud
If I define a set in my local copy of Sage using S={1,2,3} or S=set([1,2,3]), then when I type S I see {1,2,3}. But if I do it in SMC when I type S I see set([1,2,3]). I would prefer to be able to display the usual {1,2,3} when I use SMC. Thanks for any help.

William Stein

unread,
May 7, 2017, 10:01:49 AM5/7/17
to sage-cloud
Hi,

If you use a Jupyter notebook with kernel "SageMath (latest)", then it
work as you want:

https://cocalc.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-05-07-set.ipynb

Jupyter notebooks got a massive rewrite, so are much, more usable in
SageMathCloud now, and are of course also will be the default notebook
for sage-8.0...:

http://blog.sagemath.com/jupyter/2017/05/05/jupyter-rewrite-for-smc.html
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/c841549c-0bfa-4f8f-bc9a-cd9d9c5d8743%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.
Screen Shot 2017-05-07 at 7.00.17 AM.png

valer...@gmail.com

unread,
May 7, 2017, 4:14:47 PM5/7/17
to sage-cloud
Thank you. When you say that Jupyter will be the default notebook for sage 8.0, does that mean that they will replace the .sagews notebooks? I am planning to use SMC for teaching this summer and/or fall. Would you recommend that I only use Jupyter notebooks? Or is there some reason to use .sagews in some cases?

William Stein

unread,
May 7, 2017, 4:24:39 PM5/7/17
to sage-cloud
On Sun, May 7, 2017 at 1:14 PM, <valer...@gmail.com> wrote:
> Thank you. When you say that Jupyter will be the default notebook for sage
> 8.0, does that mean that they will replace the .sagews notebooks?

1. Sage -- the distribution that you download -- will make jupyter the
default notebook. It will still provide sagenb with the .sws file
format.

2. .sagews is ONLY in SMC.

> I am
> planning to use SMC for teaching this summer and/or fall. Would you
> recommend that I only use Jupyter notebooks? Or is there some reason to use
> .sagews in some cases?

Using either Jupyter or .sagews is fine, **depending on what you're
teaching**. If you're doing a lot with @interact or 3d graphics,
sagews has much better support.

Right now we also File --> Sage Worksheet, which lets you easily take
a Jupyter notebook and make a .sagews version of it. We don't have
the other direction quite yet, but plan to.

We also plan to make a new Jupyter kernel that supports all the
features of Sage worksheets, but that's a ways off still.

-- William

>
>
>
>
> On Sunday, May 7, 2017 at 8:49:08 AM UTC-5, valer...@gmail.com wrote:
>>
>> If I define a set in my local copy of Sage using S={1,2,3} or
>> S=set([1,2,3]), then when I type S I see {1,2,3}. But if I do it in SMC when
>> I type S I see set([1,2,3]). I would prefer to be able to display the usual
>> {1,2,3} when I use SMC. Thanks for any help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/f3baa79d-7089-419b-8e41-a132c9ae93ae%40googlegroups.com.

valer...@gmail.com

unread,
May 9, 2017, 9:08:31 AM5/9/17
to sage-cloud
Thanks for the information. I tried the Jupyter notebook and it works fine (when I choose kernel SageMath (latest)). I noticed that the interface seems similar to Mathematica and that's good for me because that's the only system I have used till recently. But I could not get the conversion to a .sagews file work. If I go to the File menu, I see "Sage Worksheet (.sagews)..." but it is a subitem of the "Download" item, and that is greyed out. The "Sage Worksheet (.sagews)..." item can still be selected but then I get an error that says
Error
Running nbconvert failed with an error 30 seconds ago. Read the error log below, update your Jupyter notebook, then try again.
kernel info not known, so can't save

William Stein

unread,
May 9, 2017, 9:52:37 AM5/9/17
to sage-...@googlegroups.com
Restart your project and try again.  If that doesn't work create a support request with a link to your file. 
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/1f6ecb92-7ea7-4aa9-b985-434112f1b200%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

valer...@gmail.com

unread,
May 9, 2017, 11:33:37 AM5/9/17
to sage-cloud
It worked! thank you.
Reply all
Reply to author
Forward
0 new messages