1.Jupyter Notebook:单/多行注释,组合键:选中代码,按Ctrl + /。
2.安装PHATE包
使用pip直接进行安装
pip install --user phate
成功解决AttributeError: module ‘numpy’ has no attribute ‘float’.
报错:文章来源:https://www.toymoban.com/news/detail-833896.html
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
解决方案一:
不用改代码,重新安装numpy就可以
出现这个问题的原因:np.float从1.24起被删除。所用的代码是依赖于旧版本的Numpy。可以将Numpy版本降级到1.23.5.文章来源地址https://www.toymoban.com/news/detail-833896.html
conda install numpy==1.23.5
到了这里,关于关于jupyter的一些小笔记的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!