关于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 分钟前
CrewAI :当 Agent 学会团队协作
人工智能·git·python·多智能体·agent框架
玉鸯4 分钟前
向量检索不是记忆:Agent 记忆的三层进化
python·agent
大模型码小白5 分钟前
Java 部署:Jenkins Pipeline 构建 Java 项目(自动化)
java·人工智能·python·机器学习
paeamecium17 分钟前
【PAT甲级真题】- Kuchiguse (20)
数据结构·c++·python·算法·pat考试·pat
满怀冰雪1 小时前
09-使用 paddle.nn 构建第一个多层感知机
python·深度学习·神经网络·paddle
小大宇1 小时前
python sqlalchemy 案例
开发语言·python
Ulyanov2 小时前
雷达导引头仿真中的坐标系——从惯性系到量测角
开发语言·python·算法·系统仿真·雷达信号处理·雷达导引头
codeboss2 小时前
做网页变更监控,我在“降噪”上踩过的 7 个坑
爬虫·python
果汁华2 小时前
CLI 命令行与 Python 框架实战
git·python·github
Maiko Star2 小时前
FastAPI 进阶三部曲:中间件、依赖注入与 ORM 实战
python·中间件·fastapi