Evaluating the command below in Jupyter Notebook throws an Assertion Error
but
evaluating it the Sage Notebook executes without any error.
Specifically, it is caused by setting the mesh argument to True. it plots
without any error without the mesh argument. How do I fix it?
var('y')
plot3d(sin(x)+sin(y),(x,-2*pi,2*pi),(y,-2*pi,2*pi),mesh=True)
ERROR
======
AssertionError Traceback (most recent call
last)<ipython-input-3-309886505ed6> in <module>() 1 var('y')----> 2
plot3d(sin(x)+sin(y),(x,-Integer(2)*pi,Integer(2)*pi),(y,-Integer(2)*pi,Integer(2)*pi),mesh='True')
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
in __call__(self, result) 244 self.start_displayhook() 245
self.write_output_prompt()--> 246 format_dict, md_dict =
self.compute_format_data(result) 247 self.update_user_ns(result)
248 self.fill_exec_result(result)
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
in compute_format_data(self, result) 150 151 """--> 152
return self.shell.display_formatter.format(result) 153 154 def
write_format_data(self, format_dict, md_dict=None):
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/display/formatter.pyc
in format(self, obj, include, exclude) 148 # First, use Sage rich
output if there is any 149 PLAIN_TEXT = u'text/plain'--> 150
sage_format, sage_metadata = self.dm.displayhook(obj) 151 assert
PLAIN_TEXT in sage_format, 'plain text is always present' 152 if
sage_format.keys() != [PLAIN_TEXT]:
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc
in displayhook(self, obj) 764
self._backend.set_underscore_variable(obj) 765 plain_text,
rich_output = self._rich_output_formatter(obj, dict())--> 766 return
self._backend.displayhook(plain_text, rich_output) 767 768 def
display_immediately(self, obj, **rich_repr_kwds):
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_ipython.pyc
in displayhook(self, plain_text, rich_output) 525 from
sage.repl.display.jsmol_iframe import JSMolHtml 526 jsmol =
JSMolHtml(rich_output, height=500)--> 527 return ({u'text/html':
jsmol.iframe(), 528 u'text/plain':
plain_text.text.get_unicode(), 529 }, {})
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/display/jsmol_iframe.pyc
in iframe(self) 259 </iframe> 260 """--> 261
escaped_inner_html = self.inner_html().replace('"', '"') 262
iframe = IFRAME_TEMPLATE.format( 263 script=self.js_script(),
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/display/jsmol_iframe.pyc
in inner_html(self) 235 """ 236 return
INNER_HTML_TEMPLATE.format(--> 237 script=self.js_script(), 238
width=self._width, 239 height=self._height,
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/display/jsmol_iframe.pyc
in js_script(self) 193 """ 194 script = [r"["]--> 195
for line in self.script().splitlines(): 196 script += [r"
'{0}',".format(line)] 197 script += [r"].join('\n');"]
/home/gyamfi/sage-7.3/src/sage/misc/cachefunc.pyx in
sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__
(/home/gyamfi/sage-7.3/src/build/cythonized/sage/misc/cachefunc.c:12716)()
2399 if self.cache is None: 2400 f = self.f-> 2401
self.cache = f(self._instance) 2402 return self.cache 2403
/home/gyamfi/sage-7.3/local/lib/python2.7/site-packages/sage/repl/display/jsmol_iframe.pyc
in script(self) 156 command, obj, meshfile =
line.split(' ', 3) 157 assert command == 'pmesh'--> 158
assert meshfile.startswith('"') and meshfile.endswith('"\n')
159 meshfile = meshfile[1:-2] # strip quotes 160
script += [
AssertionError:
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.