美文网首页
jupyter notebook使用 上一个cell的变量无法识

jupyter notebook使用 上一个cell的变量无法识

作者: _龙雀 | 来源:发表于2019-06-03 16:39 被阅读0次

    最近的一个bug,官方还没修复。
    在cell里使用了%%time ,则变量不会被存储
    比如你在一个cell里运行

    %%time
    a = 8
    

    在下一个cell调用变量a会报错
    NameError: name 'a' is not defined

    相关文章

      网友评论

          本文标题:jupyter notebook使用 上一个cell的变量无法识

          本文链接:https://www.haomeiwen.com/subject/hhzcxctx.html