2
我經常使用JupyterJupyter:在線路魔術參數的命令
的小區魔命令%%px --targets 3
#Some code
上運行簇編號3的一些代碼是什麼的語法來實現使用線魔相同的結果命令?
我試圖
%px --targets 3 #Some code
,但它不工作
我經常使用JupyterJupyter:在線路魔術參數的命令
的小區魔命令%%px --targets 3
#Some code
上運行簇編號3的一些代碼是什麼的語法來實現使用線魔相同的結果命令?
我試圖
%px --targets 3 #Some code
,但它不工作
(未測試)可以將後綴與羣集號3如下描述https://ipython.org/ipython-doc/3/parallel/magics.html#multiple-active-views
所以假設你IPython.parallel.Client
實例相關聯被稱爲rc
c3 = rc[3]
c3.activate('_3')
c3.block = True
,那麼你將能夠編寫
%px_3 #some code
的系魔法和
%%px_3
#some code
的細胞魔法。
許多行魔術都有爭議。輸入'%magic'查看文檔。線魔法和具有相同名稱的單元魔術之間可能存在差異。 –