当前位置:   article > 正文

关于jupyter的一些小笔记

关于jupyter的一些小笔记

关于jupyter的一些小笔记

1.Jupyter Notebook:单/多行注释,组合键:选中代码,按Ctrl + /。
2.安装PHATE包
使用pip直接进行安装

pip install --user phate
  • 1

成功解决AttributeError: module ‘numpy’ has no attribute ‘float’.
报错:

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  • 1
  • 2
  • 3
  • 4

解决方案一:
不用改代码,重新安装numpy就可以
出现这个问题的原因:np.float从1.24起被删除。所用的代码是依赖于旧版本的Numpy。可以将Numpy版本降级到1.23.5.

conda install numpy==1.23.5
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/552470
推荐阅读
  

闽ICP备14008679号