关于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
相关推荐
zzzzzz3101 小时前
AI 助手最危险的不是报错,而是“看起来成功”:我给工作流加了四道保险
人工智能·python
用户8356290780511 小时前
如何使用 Python 将 PowerPoint 转换为 PDF 文档
后端·python
菜冻鱼1 小时前
Python-pytorch-高级技巧
开发语言·人工智能·pytorch·python·深度学习·神经网络·聚类
lpfasd1231 小时前
python webview打包版卡死、开发版正常
开发语言·python
用户8356290780511 小时前
如何使用 Python 为 PowerPoint 幻灯片添加切换效果
后端·python
菜冻鱼1 小时前
Python-pytorch-模型保存与加载
开发语言·人工智能·pytorch·python·深度学习·机器学习
亿牛云爬虫专家2 小时前
爬虫调度系统设计:用 Celery 实现按媒体权重动态调整的抓取频率控制
爬虫·python·隧道代理·舆情采集·媒体权重·频率控制·ip自动轮换
Code额3 小时前
Python 连接 DeepSeek API,OpenAI
开发语言·python·ai·ai编程
Suhan423 小时前
SQLAlchemy的两种查询query()查询、stmt=select()查询
数据库·python·sql·oracle
AAA@峥4 小时前
Python 基础开篇:认识 Python、版本选择、环境部署与首个 HelloWorld
开发语言·python