关于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
相关推荐
Sirius.z18 小时前
第R6周:LSTM实现糖尿病探索与预测
python
名字还没想好☜18 小时前
Python f-string 进阶:数字格式化、对齐填充、调试 = 号与嵌套表达式
开发语言·数据库·python·字符串格式化·f-string
·薯条大王18 小时前
经济实惠玩云服务器|一台云服务器多人共用,子账号配置教程
java·linux·运维·服务器·汇编·c++·python
Dxy123931021619 小时前
Python 如何使用 MySQL 的事务
python·mysql
今儿敲了吗1 天前
Python ——第三方包
笔记·python
麒麟水手1 天前
国产银河麒麟系统开发实录:跑通Streamlit,我踩过的6个坑
python
麒麟水手1 天前
麒麟系统部署检查清单:上线前30分钟,逐项自查这4类问题
python
用户0332126663671 天前
使用 Python 在 PDF 中添加或删除数字签名
python
代码方舟1 天前
零信任架构实战:基于天远柠檬查出险-登记证API构建自动化车辆履约评估网关
人工智能·python·架构·自动化
估值探索者1 天前
【Python实时盯盘与预警 #08】成交额突然放大2倍?Python窗口比较抓异动
java·开发语言·python