[sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread HG
sage-support is one of the best list. English is not my mother language and sometimes I don't explain myself well but always people here are very kind and trying to help... It's very important this can long ! Le vendredi 14 septembre 2018 18:00:55 UTC+2, Peter Luschny a écrit : > > How can I

Re: [sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread Kolen Cheung
Thanks. This answer my question and I put the tip in https://groups.google.com/d/msg/sage-support/NFtI5XqjQWg/sz5WPcFMAgAJ On Monday, November 19, 2018 at 3:58:50 AM UTC-8, John Cremona wrote: > > I recommend importing anything you need from sage.all since the details of > where everything is

Re: [sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread Kolen Cheung
I wonder why for me the result is >>> import_statements(QQ) # ** Warning **: several names for that object: Q, QQ from sage.rings.rational_field import Q On Monday, November 19, 2018 at 4:05:55 AM UTC-8, Dima Pasechnik wrote: On Mon, Nov 19, 2018 at 11:58 AM John Cremona > wrote: > > > >

Re: [sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread Dima Pasechnik
On Mon, Nov 19, 2018 at 11:58 AM John Cremona wrote: > > I recommend importing anything you need from sage.all since the details of > where everything is might change in time. This works perfectly well: > > $ sage -python # so we use Sage's python not my system-wide one > Python 2.7.15

[sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread Kolen Cheung
Thank you both for the answers. However, I’m still stuck: Focusing on just translating the first line: R. = QQ[] In sage, >>> preparse("R. = QQ[]")"R = QQ['x']; (x,) = R._first_ngens(1)">>> >>> import_statements(QQ)# ** Warning **: several names for that object: Q, >>> QQfrom

[sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread slelievre
Mon 2018-11-19 09:41:03 UTC+1, Simon King: > > If I recall correctly, there is a function that for *many* (not all) > interactively created objects in Sage tells how they can be constructed, > but I don't recall the name of that function. That is sage_input, which can be used as follows:

[sage-support] Re: Quaternions, how to speed up computation

2018-11-19 Thread Simon King
Hi On 2018-11-19, Kolen Cheung wrote: > Then I thought I can import it in Python like this: > > import sage.rings > # OK > > sage.rings.polynomial.polynomial_ring.PolynomialRing_field > # AttributeError Admittedly the following is not an ideal solution, but you can do >>> from sage import