关于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
相关推荐
少陽君3 分钟前
服务器服务检查报告
python
x秀x5 分钟前
sam3新手使用教程
开发语言·python
Java后端的Ai之路6 分钟前
大模型LLM评估完全指南
开发语言·人工智能·python·llm·评估
外收内放10 分钟前
Python学习记录25(基础知识终结篇)
python·学习
别动我齐刘海11 分钟前
ROS2 Jazzy + C++ 实战路线——基础学习1
c++·vscode·python·ubuntu·机器学习·自动驾驶·github
life码农18 分钟前
python框架Flask多语言配置示例
python·flask
苏离~Hack26 分钟前
SL-crawler:一个可视化配置的通用网页与 API 数据采集工具
python
小白学大数据30 分钟前
Python 小工具实战:用问财接口搭建金融数据采集器
开发语言·人工智能·python
青少儿编程课堂42 分钟前
多源最短路与最小环(Floyd 算法图论解析)
c++·python·算法·bfs·信息学竞赛
PiaoKe___44 分钟前
从端云解耦到可编程 Android 实例:云手机架构解析与 Python 批量管控实战
arm开发·python·架构·自动化