关于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
相关推荐
guidovans7 分钟前
Crawl4AI精准提取结构化数据
人工智能·python·tensorflow
言之。1 小时前
Django REST Framework响应类Response详解
后端·python·django
Abadbeginning1 小时前
FastSoyAdmin centos7云服务器+宝塔部署
vue.js·后端·python
kida_yuan1 小时前
【从零开始】13. 数据增强(Data Augmentation)
数据结构·python·nlp
封奚泽优2 小时前
班级互动小程序(Python)
python·deepseek
MediaTea2 小时前
Python:math 库函数手册(双曲函数)
开发语言·python
枫叶V2 小时前
用 FastAPI 实现大文件分片上传与断点续传(含可运行示例与客户端脚本,仅供参考)
python·fastapi
神仙别闹2 小时前
基于 Python + redis + flask 的在线聊天室
redis·python·flask
Python私教3 小时前
Django全栈班v1.01 Python简介与特点 20250910
后端·python·django