关于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
相关推荐
Full Stack Developme19 小时前
Spring Bean 依赖注入
python·spring·log4j
yuhuofei202119 小时前
【Python入门】Python中的元组tuple
python
清水白石00819 小时前
从菱形继承到 `super()`:彻底理解 Python MRO 与多继承方法查找机制
开发语言·python
CTA终结者20 小时前
期货量化下单前资金怎么核对:天勤 get_account 与可用、权益字段
python·区块链
zyl8372120 小时前
Python NumPy 学习
python·学习·numpy
装不满的克莱因瓶21 小时前
学习使用 Python 机器学习工具 sklearn
人工智能·python·学习·机器学习·ai·agent·智能体
辣椒思密达21 小时前
Python HTTP请求中的重试与超时控制:提升稳定性的实用方法
开发语言·python·http
Omics Pro1 天前
3种蛋白结构输入方式!已申报欧洲发明专利
数据库·人工智能·python·机器学习·plotly
Psycho_MrZhang1 天前
Codex 高效开发协作手册
python
HappyAcmen1 天前
1.pdfplumber安装,PDF文字提取
python·pdf