关于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
相关推荐
FriendshipT1 分钟前
Ultralytics:解读C3Ghost模块
人工智能·pytorch·python·深度学习·目标检测
Java面试题总结6 分钟前
Vue3流式调用大模型接口完整实践
后端·python
怪兽学LLM10 分钟前
AI Agent 记忆系统设计:长短期记忆如何实现?什么时候存?什么时候查?
人工智能·python
DFT计算杂谈12 分钟前
DeepSeek 集群服务器无root本地部署指南
数据库·人工智能·python·opencv·算法
卷无止境15 分钟前
Python 跨平台 GUI 解决方案全景报告
前端·python
benchmark_cc10 小时前
如何用 Python + QuantDash 快速构建高胜率“配对交易(Pairs Trading)”策略?
开发语言·人工智能·python·pandas·量化交易·quantdash
Python+9911 小时前
Java 枚举类(Enum)详解:从基础到高级应用
java·开发语言·python
dunge202612 小时前
2026年7月最新ChatGPT Plus / Pro 与 Codex:当 AI Agent 最新5.6版本来袭,必须理解事务、幂等与补偿
开发语言·人工智能·python
小白学大数据14 小时前
两周完成爬虫技术栈升级:Scrapy 迁移 Crawlo 的路径与取舍
爬虫·python·scrapy
用户83562907805114 小时前
使用 Python 在 Excel 中添加和自定义文本框
后端·python