ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 01 Oct 2018 08:51:51 +0200Error: 'Object has no attribute 'intersection''https://ask.sagemath.org/question/43799/error-object-has-no-attribute-intersection/Hi, I am pretty new to SAGE and and am not understanding why my code keeps giving me the error **'RelativeOrder_with_category' object has no attribute 'intersection'**. Here is my code:
sage: P1=x^3-x^2-4*x-1
sage: P2=x^3+x^2-2*x-1
sage: K1.<p>=NumberField(P1)
sage: K2.<d>=NumberField(P2)
sage: K.<p,d>=ExtensionField(K1,P2)
sage: O_K=K.ring_of_integers()
sage: A_K1=O_K.intersection(K1)
AttributeError: 'RelativeOrder_with_category' object has no attribute 'intersection'
I have looked at a lot of examples from other questions, but I can't seem to find a solution.
northcity4Mon, 01 Oct 2018 08:51:51 +0200https://ask.sagemath.org/question/43799/Please Append 'solve' Help Documentationhttps://ask.sagemath.org/question/32387/please-append-solve-help-documentation/ Hello,
I have been using SAGE for about 2 years, and only now have I finally figured out how to get the 'solve()' function to print out its solutions in plain form (so I can save the answers as variables, which is EXTREMELY important for me).
In order to do this: I had to sift through the help pages for 'solve', Programming -- Data Types (for both Lists and Dictionaries), and Python's official documentation on Lists and Dictionaries; until I finally figured out that you need to use the code:
print( 'listname' [ ' dict # ' ] [ 'var' ])
Now this may seem very elementary to those whom are fluent in Python, but for general users (like me): there is absolutely no clear indication on how to call one or several elements of several Dictionaries inside of a List.
PLEASE append your documentation so that people can actually use the 'solve' function without having to copy and paste the answers because it isn't shown how to properly use the output when 'solution_dict=true'.
(Note: if you're thinking about the 'for' loop example in the help documentation: it's completely useless for someone who needs to select one or more of those solutions & save them as variables).
Thank you.BLU7211Sat, 30 Jan 2016 21:46:43 +0100https://ask.sagemath.org/question/32387/'module' object has no attribute 'graphics_filename'https://ask.sagemath.org/question/9617/module-object-has-no-attribute-graphics_filename/Hello everybody!
I typed at Sage Notebook:
a = animate([circle((i,i), 1-1/(i+1), hue=i/10) for i in srange(0,2,0.2)], xmin=0,ymin=0,xmax=2,ymax=2,figsize=[2,2])
a.show()
I got the message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_9.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSA9IGFuaW1hdGUoW2NpcmNsZSgoaSxpKSwgMS0xLyhpKzEpLCBodWU9aS8xMCkgZm9yIGkgaW4gc3JhbmdlKDAsMiwwLjIpXSwgeG1pbj0wLHltaW49MCx4bWF4PTIseW1heD0yLGZpZ3NpemU9WzIsMl0pCmEuc2hvdygp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpWYgSDe/___code___.py", line 4, in <module>
exec compile(u'a.show()
File "", line 1, in <module>
File "/home/andrei/sage-5.4/local/lib/python2.7/site-packages/sage/plot/animate.py", line 458, in show
self.gif(delay = delay, iterations = iterations)
File "/home/andrei/sage-5.4/local/lib/python2.7/site-packages/sage/plot/animate.py", line 381, in gif
savefile = sage.misc.misc.graphics_filename(ext='gif')
AttributeError: 'module' object has no attribute 'graphics_filename'
Please help me to understand what went wrong. What is missing? Thanks.AndreWinFri, 07 Dec 2012 07:44:40 +0100https://ask.sagemath.org/question/9617/