[sage-support] .format of RR-element

2017-04-28 Thread Daniel Krenn
Shouldn't the following two both work? sage: '%.2f' % (pi.n(),) '3.14' sage: '{:.2f}'.format(pi.n()) --- ValueErrorTraceback (most recent call last) in () > 1 '{:.2f}'.format(pi.n()) Valu

[sage-support] graphs: moving vertices by mouse

2017-04-28 Thread Daniel Krenn
Is there a way to click on a vertex of a SageMath-graph (in some notebook, Jupyter or SMC-notebook) and drag it around, thus manually positioning the vertices? (I think there was a graph_editor in the old Sage Notebook which could do this, but this does not seem to work in one of the new notebooks

Re: [sage-support] graphs: moving vertices by mouse

2017-04-28 Thread William Stein
In SMC in a **Sage worksheet**, do show(g) for g a graph, and you'll get something. For example: https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-04-28-131029-graph-move.sagews On Fri, Apr 28, 2017 at 1:07 PM, Daniel Krenn wrote: > Is there a way to

Re: [sage-support] graphs: moving vertices by mouse

2017-04-28 Thread Daniel Krenn
On 2017-04-28 22:11, William Stein wrote: > In SMC in a **Sage worksheet**, do > > show(g) Thanks. (I've tried g.show() in the SMC, and then one gets only the usual static representation). Best Daniel -- You received this message because you are subscribed to the Google Groups "sage-support"

[sage-support] Re: .format of RR-element

2017-04-28 Thread Nils Bruin
Yes, clearly our reals should have __format__ support. In fact, this could work a lot better than the "%" formatting support we have now, which I think is provided by the "__float__" method. It has issues: sage: '%.60f'%(pi.n(300),) '3.141592653589793115997963468544185161590576171875000