关于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
相关推荐
IronMurphy10 分钟前
Java 泛型深度解析:编译期类型擦除机制与 PECS 准则
java·windows·python
Roselind_Yi17 分钟前
多模态数据挖掘前沿:生物医学与情感分析领域论文深度解析
人工智能·python·数据挖掘·nlp·gnn·情感分析·loss
小羊羔heihei24 分钟前
Python编程实战:12道趣味算法题
笔记·python·学习·其他·算法·学习方法·交友
南 阳42 分钟前
Python从入门到精通day59
开发语言·python·php
JMchen12342 分钟前
Android NDK开发从入门到实战:解锁应用性能的终极武器
android·开发语言·c++·python·c#·android studio·ndk开发
weixin_4577600043 分钟前
深入解析 Beam Search:从原理到实践的高效解码算法
python·算法
小羊羔heihei1 小时前
Python列表操作全攻略
经验分享·笔记·python·学习·其他·交友
2501_908329851 小时前
实战:用OpenCV和Python进行人脸识别
jvm·数据库·python
老刘说AI2 小时前
WorkFlow Agent案例:auto_document_agent(文件自动处理)
开发语言·数据库·人工智能·python·神经网络·自然语言处理
ZhengEnCi2 小时前
M1-如何转换为HTML
python·html