Fwd: Issues on SageCell?

46 views
Skip to first unread message

kcrisman

unread,
May 12, 2017, 10:15:21 AM5/12/17
to sage...@googlegroups.com
Forwarding from sage-edu 
Dear Group:

I have recently encountered a few issues related to using http://sagecall.sagemath.org in class which never happened before. 

#1) show()
I usually use the show() command when displaying output as my students and I like "pretty print." 
However, recently I've had to switch to using only print() because show() outputs nothing. 
Is there a known issue that causes this? 
If so, is there a fix?

#2) comments
When I make a permalink to share my SageCells online, sometimes the comments are truncated. 
I use "#" as in the python comment.

#3) n()
On a separate note, I like using the n() method whenever I need to display decimal approximations to many digits. 
Is there a way to do this in pure python without SAGE?

TIA,
A. Jorge Garcia
Baldwin SHS & Nassau CC

Andrey Novoseltsev

unread,
May 12, 2017, 11:55:43 AM5/12/17
to sage-edu, sage...@googlegroups.com
Can you please be more specific and give examples? Both show and comments work fine for me:
http://sagecell.sagemath.org/?z=eJwrzsgv16iIM9JUUFYISS0uycxLVygGiikk5qUoJOfn5qbmlRTzcoGENJQc8_JLMlKLFHIy81KV8OpQKCnPTE4FC5VnlmQo5OQDVZWkVpQA9WanKpRkZBbTCgAArJNSXA==&lang=sage

As for n() without Sage, how can it work when it is implemented in Sage specifically?..

Best,
Andrey

Jorge Garcia

unread,
May 12, 2017, 1:26:42 PM5/12/17
to sage-cell
I thought n() was implemented in python.
Thanx,
AJG

Jorge Garcia

unread,
May 12, 2017, 1:29:04 PM5/12/17
to sage-cell

Jorge Garcia

unread,
May 12, 2017, 1:34:16 PM5/12/17
to sage-cell
Regarding show(), if I view the link above on my school PC, show() has no output, I just see the plot. If I view it on my tablet or cellphone, I get output from show().

How odd, this never happened before. I used sagecell all year last year without any issue. I haven't used sagecell much this year until now. I was counting on using sagecell for my final projects with my AP Calculus BC students.
TIA,
AJG

A Jorge Garcia

unread,
May 12, 2017, 4:57:22 PM5/12/17
to sage...@googlegroups.com, sage-edu, sage...@googlegroups.com
Isn't n() implemented in python?
TIA,
AJG

Sent from BlueMail
--
You received this message because you are subscribed to the Google Groups "sage-edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-edu+u...@googlegroups.com.
To post to this group, send email to sage...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-edu.
For more options, visit https://groups.google.com/d/optout.

Andrey Novoseltsev

unread,
May 13, 2017, 12:32:19 AM5/13/17
to sage-cell

It is likely due to the switch for MathJax CDN: https://github.com/sagemath/sagecell/commit/5a419e46051be8461e5c86b130bbcd1424401258

I imagine you are not the only one affected, but I can't fix it unless I know how to reproduce the problem or least what exactly it is. Maybe browser cache or school firewall - can you check for any errors in browser console? Different browsers also may help to clarify the situation.

Andrey Novoseltsev

unread,
May 13, 2017, 12:33:48 AM5/13/17
to sage-cell

So what is the problem? Is there supposed to be more text? Can you perhaps copy-paste here what you are trying to save via a permalink and what you are getting back?

kcrisman

unread,
May 13, 2017, 8:14:23 AM5/13/17
to sage-cell, sage...@googlegroups.com


On Friday, May 12, 2017 at 4:57:22 PM UTC-4, Jorge Garcia wrote:
Isn't n() implemented in python?


I don't think so; it is a shortcut for .numerical_approx() in Sage, if I recall correctly. 
Message has been deleted

Jorge Garcia

unread,
May 13, 2017, 9:57:55 PM5/13/17
to sage-cell
Is there a way to implement something similar to numerical_approx() in python, say with scipy or numpy?

My Calculus students are doing a final project related to solving free response questions from old AP exams using SAGE and also in plain python. For example they are writing their own (numerical) versions of find_root(), diff() and integrate(). I showed them a little bit of python and they wrote their own newton's method, difference quotient and Riemann sum algorithms. I set up an Ubuntu ssh server with python installed for them to use for this purpose.

All was going well until they asked me how to write their own n() method. This is where I got stumped.

Thanx in advance,
A. Jorge Garcia
Reply all
Reply to author
Forward
0 new messages