关于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
相关推荐
kkoral12 分钟前
如何在 Python 中使用 OpenCV 调用 FFmpeg 的特定功能?
python·opencv·ffmpeg
樹JUMP14 分钟前
Python虚拟环境(venv)完全指南:隔离项目依赖
jvm·数据库·python
free_7316 分钟前
超越“回答”,AI Agent迎来全链路安全治理挑战
人工智能·python·网络安全
sg_knight17 分钟前
设计模式实战:策略模式(Strategy)
java·开发语言·python·设计模式·重构·架构·策略模式
飞Link25 分钟前
告别 ROS 的臃肿:用 ZeroMQ 构建极速具身智能分布式大脑(附 Python 实战)
开发语言·分布式·python
嫂子的姐夫28 分钟前
039-DES:gov招标(解密)
爬虫·python·js逆向·逆向
jgyzl31 分钟前
2026.3.20 用EasyExcel实现excel报表的导入与导出
java·python·excel
weixin_4331793339 分钟前
python - 正则表达式Regex
python·正则表达式
Riemann~~1 小时前
ros2写一个可以修改参数的node
开发语言·python·ros2·机器人系统
郝学胜-神的一滴1 小时前
PyTorch 张量基础:零张量/一张量/指定值张量全解析
人工智能·pytorch·python