关于jupyter的一些小笔记

关于jupyter的一些小笔记

1.Jupyter Notebook:单/多行注释,组合键:选中代码,按Ctrl + /。

2.安装PHATE包

使用pip直接进行安装

复制代码
pip install --user phate

成功解决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

解决方案一:

不用改代码,重新安装numpy就可以

出现这个问题的原因:np.float从1.24起被删除。所用的代码是依赖于旧版本的Numpy。可以将Numpy版本降级到1.23.5.

复制代码
conda install numpy==1.23.5
相关推荐
dhxhsgrx2 分钟前
PYTHON训练营DAY25
java·开发语言·python
伊织code2 小时前
PyTorch API 5 - 全分片数据并行、流水线并行、概率分布
pytorch·python·ai·api·-·5
风逸hhh2 小时前
python打卡day25@浙大疏锦行
开发语言·python
魔尔助理顾问3 小时前
Flask如何读取配置信息
python·flask·bootstrap
jc_hook4 小时前
Python 接入DeepSeek
python·大模型·deepseek
chicpopoo5 小时前
Python打卡DAY25
开发语言·python
crazyme_65 小时前
深入掌握 Python 切片操作:解锁数据处理的高效密码
开发语言·python
Code_流苏6 小时前
《Python星球日记》 第69天:生成式模型(GPT 系列)
python·gpt·深度学习·机器学习·自然语言处理·transformer·生成式模型
于壮士hoho7 小时前
Python | Dashboard制作
开发语言·python
掘金-我是哪吒7 小时前
分布式微服务系统架构第131集:fastapi-python
分布式·python·微服务·系统架构·fastapi