关于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
相关推荐
吠品1 分钟前
处理 Python 类继承中那些变来变去的初始化参数
linux·前端·python
会Tk矩阵群控的小木5 分钟前
小红书矩阵软件:基于Python+ADB的多设备批量管理自动化脚本实战
运维·python·adb·矩阵·自动化·新媒体运营·个人开发
复园电子12 分钟前
企业PDF批量盖章开发集成指南:API对接OA/LIMS系统,高并发落地实战
开发语言·python·pdf
石山代码19 分钟前
类型限定符的底层实现原理是什么?
python
雾沉川24 分钟前
PyCharm 2025.2 完整安装与配置技术教程
ide·python·pycharm
眠りたいです30 分钟前
LangChainv1:agent快速上手与中间件认识
人工智能·python·中间件·langchain·langgraph
2601_9563198832 分钟前
期货报单被拒怎么识别与处理:order 状态与 last_msg 用法
python·区块链
yijianace38 分钟前
Python爬虫实战:分页爬取 + 详情页采集 + CSV存储
前端·爬虫·python
蜂蜜黄油呀土豆41 分钟前
Agent 循环:观察、思考、行动(ReAct 入门)
python·ai·大模型·react·js
SilentSamsara1 小时前
特征工程系统方法论:编码、分箱、交互特征与特征选择
开发语言·人工智能·python·机器学习·青少年编程·信息可视化·pandas