关于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
相关推荐
梦想不只是梦与想4 分钟前
环境管理:Conda 与 venv
python·conda·uv
Yolanda_20224 分钟前
6.pytorch加载数据初认识
python
更深兼春远6 分钟前
Python到底怎么用于测试?
自动化测试·软件测试·python·接口测试
我不会起名字32213 分钟前
一天一道力扣Hot100(36):深度优先算法---组合总和
数据结构·c++·后端·python·算法·go
东莞市云毅网络有限公司33 分钟前
PDF 表格抽取的三条技术路线对比:规则、库解析与版面识别
python·sqlite·自动化运维·geo·数据监测
外收内放1 小时前
Python与AI应用(项目开发实战:AI智能伴侣第一版)
python·学习·ai编程
绘梨衣5471 小时前
慢SQL排查手册
python·sql
troy1281 小时前
告别 Copilot?Codex、Claude Code、DeepSeek Harness、Kimi、ChatGPT 哪个更适合本地化部署,更有性价比?
人工智能·python·开源软件
IvanCodes1 小时前
Python 文件操作(十二):文件与目录的读写
开发语言·python
Y幽谷客10 小时前
Python加载本地大模型(Qwen3.5 8B)
python·大模型