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.Fri, 19 Jan 2018 21:11:30 +0100@interact : Fix the default renderinghttps://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/I have created the [following interact](https://sagecell.sagemath.org/?z=eJyNkTFrwzAQhfdA_oMINj5h0TqFLA2Cbt6yeLQdoySXRFSRhSRTu6H_vWqcNqVkqAYh3n3v7h16kdqjFVs_nexwTxoQXGrT-WbT9hAU0SnP549P654psUHFZwJ6OqNMZ_dAylb35AWlz9MJIQX3nVEIZUb2rSWSSE2s0AeELDSkNR2hIr1iAn7UnJs2ZHVQ6oyNOtu2qrU82Qn7erCIOmEjI9-RL7KL7c-Y4F2NUcIcI6yXqBTyopR1KkCmc3qt3TLcsPpazHmefocJFvaL-E8kd2zfIL88jUXvh8bYgMDRnxQkUVTtpDNKDM4PCivXnZqz5rH7WJ_DFTan1ZJXy9hFURJfFgo_47GHolzVDxro15lOPgG44JSK&lang=sage).
It plots the partial sums of a series up to N, et prints out the last one.
The default rendering yields a DeprecationWarning and does not show the partial sum value.
When you update the data, the rendering is fine.
How can I fix this?
Thu, 18 Jan 2018 16:45:46 +0100https://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/Answer by kcrisman for <p>I have created the <a href="https://sagecell.sagemath.org/?z=eJyNkTFrwzAQhfdA_oMINj5h0TqFLA2Cbt6yeLQdoySXRFSRhSRTu6H_vWqcNqVkqAYh3n3v7h16kdqjFVs_nexwTxoQXGrT-WbT9hAU0SnP549P654psUHFZwJ6OqNMZ_dAylb35AWlz9MJIQX3nVEIZUb2rSWSSE2s0AeELDSkNR2hIr1iAn7UnJs2ZHVQ6oyNOtu2qrU82Qn7erCIOmEjI9-RL7KL7c-Y4F2NUcIcI6yXqBTyopR1KkCmc3qt3TLcsPpazHmefocJFvaL-E8kd2zfIL88jUXvh8bYgMDRnxQkUVTtpDNKDM4PCivXnZqz5rH7WJ_DFTan1ZJXy9hFURJfFgo_47GHolzVDxro15lOPgG44JSK&lang=sage">following interact</a>.</p>
<p>It plots the partial sums of a series up to N, et prints out the last one.</p>
<p>The default rendering yields a DeprecationWarning and does not show the partial sum value.
When you update the data, the rendering is fine.</p>
<p>How can I fix this?</p>
https://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/?answer=40687#post-id-40687Deprecation warnings are not errors, and so show only once per session by default.
The problem is `a(n0)`. Since you only specify it as an *expression* and not a *function*, in principle there could have been other variables (e.g. `a(n0)+n1-n1`) involved. There have been long discussions about this among the developers, but quite some time ago it was decided that one must have the variable.
If you are sure you will always have `x` as the variable, then you can just add the first line here
a(x)=a
S=S+tuple([a(n0)])
and all should be well. Partial sums are fun, hope you enjoy it!Fri, 19 Jan 2018 05:08:29 +0100https://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/?answer=40687#post-id-40687Comment by Boston for <p>Deprecation warnings are not errors, and so show only once per session by default.</p>
<p>The problem is <code>a(n0)</code>. Since you only specify it as an <em>expression</em> and not a <em>function</em>, in principle there could have been other variables (e.g. <code>a(n0)+n1-n1</code>) involved. There have been long discussions about this among the developers, but quite some time ago it was decided that one must have the variable.</p>
<p>If you are sure you will always have <code>x</code> as the variable, then you can just add the first line here</p>
<pre><code>a(x)=a
S=S+tuple([a(n0)])
</code></pre>
<p>and all should be well. Partial sums are fun, hope you enjoy it!</p>
https://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/?comment=40697#post-id-40697Thanks kcrisman!Fri, 19 Jan 2018 21:11:30 +0100https://ask.sagemath.org/question/40678/interact-fix-the-default-rendering/?comment=40697#post-id-40697