Issues on SageCell?

38 views
Skip to first unread message

Jorge Garcia

unread,
May 12, 2017, 8:25:55 AM5/12/17
to 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

kcrisman

unread,
May 12, 2017, 10:15:36 AM5/12/17
to sage-edu
I've forwarded this to the sage-cell Google group.

Jorge Garcia

unread,
May 12, 2017, 11:06:33 AM5/12/17
to sage-edu
OK, thanx, I didn't know about that group.
Sincerely,
AJG

Andrey Novoseltsev

unread,
May 12, 2017, 11:55:42 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

A Jorge Garcia

unread,
May 12, 2017, 4:57:23 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.

dimpase

unread,
May 12, 2017, 6:01:03 PM5/12/17
to sage-edu, sage...@googlegroups.com


On Friday, May 12, 2017 at 9:57:23 PM UTC+1, Jorge Garcia wrote:
Isn't n() implemented in python?

yes, however, it happens to need 

>> from sage.all import *

to work in "your" Python. Practically speaking, this means that Python must be Python that comes with Sage.

kcrisman

unread,
May 13, 2017, 8:14:25 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. 

Jorge Garcia

unread,
May 13, 2017, 9:55:57 PM5/13/17
to sage-cell, sage...@googlegroups.com
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 fromold 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  how to write thasked me how to write their own n() method. This is where I got stumped.

Thanx in advance,
A. Jorge Garcia

dimpase

unread,
May 14, 2017, 4:10:55 AM5/14/17
to sage-edu
What exactly do you mean by "pure" python? Which libraries are allowed? On what platforms does it have to run?

As well, what data do you need to numerically approximate?

sorry for so many '?' :)

Reply all
Reply to author
Forward
0 new messages