简体   繁体   中英

Execution by dependencies in jupyter notebook

I am using execution_dependencies to specify cell execution.

Here is a simple example: I want to execute cell C first that depends on outputs from B and B depends on A

#C =>B   
y = y.subs({a:1,b:2})

#B =>A   
from sympy.abs import a,b
y= a+b
#A
from sympy import *

I appreciate any ideas.

I have encount the similar problem.
Make sure you use the tag toolbar to insert tag, NOT insert tag in the cell block.

To see Tags Toolbar on your cells: View - Cell Toolbar - Tags
Use the “Add tag” button in Tag Toolbar, add following tags respectively in three cells as you want.

#C =>B   
#B =>A   
#A  

Then, (in my computer) execute cell #C will execute cell #B and cell #A automatically.
This is a demo ipynb of mine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM