关于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
相关推荐
FriendshipT16 分钟前
Ultralytics:解读CBLinear模块
人工智能·pytorch·python·深度学习·目标检测
AI开发发烧友40 分钟前
LangGraph多Agent协作实战:以物流售前场景为例的5 Agent工作流设计
python
码云骑士44 分钟前
70-多Agent协作-CrewAI-AutoGen-角色分工与信息传递协议
python
Hachi被抢先注册了1 小时前
Skills总结
python
用户0332126663671 小时前
使用 Python 在 PowerPoint 中创建折线图和条形图
python
benchmark_cc1 小时前
如何用 Python 进行多周期 K 线合成与时区对齐?基于 QuantDash 与 Pandas 的量化数据清洗实战(附 GitHub 源码)
开发语言·python·github·盯盘·pandas·quantdash·量化数据
不如语冰1 小时前
AI大模型入门-参数的传递
数据结构·人工智能·pytorch·python
用户6760840656172 小时前
GraphBLAS_01_图的稀疏表示
python
小陈工2 小时前
第7篇:Django框架核心原理与实战深度解析(下)
后端·python·面试
用户298698530142 小时前
Python 数据处理:XML 与 Excel 互转的实用指南
后端·python·excel