Jupyter notebook is already a good framework to write code like literature,
and unfortunately, I don't think that we need a different tooling from 
SymPy to do that.

I just advice to make multiple cells, structure your notebooks well,
and print the intermediate results of your computation often in your cell
(use print or display)

I don't think that it is easy for any computer algebra, or related tools to 
support 'step-back' functionality.
I haven't seen that in other competitors, like Mathematica, too.
The problem can be generalized to time-travel debugging (Time travel 
debugging - Wikipedia <https://en.wikipedia.org/wiki/Time_travel_debugging>
), 
and it is an area of research, if it matters how to do it correctly, or 
efficiently.

On Wednesday, December 6, 2023 at 10:20:16 PM UTC [email protected] wrote:

> Aaron's comments are really important. These are pitfalls that can easily 
> lead to inconsistent outcomes and notebooks that do not work.
>
> On Wednesday, December 6, 2023 at 3:09:16 PM UTC-6 [email protected] 
> wrote:
>
>> It really depends on how you structure your code. SymPy expressions 
>> are immutable, so if you just assign each step to a different 
>> variable, you can easily refer back to previous variables. 
>>
>> You should also be careful with Jupyter notebooks that if you delete 
>> cells, or insert cells before other cells, you may end up with a 
>> notebook that doesn't actually execute again if you open it again 
>> later, because when you start a notebook from scratch the cells are 
>> always executed from top to bottom, which may not be the original 
>> execution order. It can sometimes be a good idea to "restart and run 
>> all" in your notebook to reset the state and ensure everything runs 
>> again. 
>>
>> Aaron Meurer 
>>
>> On Mon, Dec 4, 2023 at 10:24 AM Mario Lemelin <[email protected]> 
>> wrote: 
>> > 
>> > Hello, 
>> > This is my first time. Just wondering if there is a command that I can 
>> do when, in a jupyter notebook, when I want to go back one step (If I did a 
>> bad algebraic manipulation for example). Thank you in advance for your 
>> help. Mario 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "sympy" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to [email protected]. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/82c3aedb-215b-4083-a462-42bbc5684632n%40googlegroups.com.
>>  
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/084e76bd-a7ca-45a0-836c-023b66890e97n%40googlegroups.com.

Reply via email to