关于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
相关推荐
努力的小Qin2 小时前
梯度下降如何实现参数优化:从线性回归到 Sigmoid 分类
人工智能·python·神经网络
zander2582 小时前
LeetCode 739:每日温度——为什么单调栈要持续弹出
开发语言·python·算法
for_ever_love__3 小时前
python基础语法学习: 文件操作
python·学习
青春不败 177-3266-05203 小时前
基于R、Python的Copula变量相关性分析及AI大模型应用
人工智能·python·r语言·贝叶斯·统计学·copula
汤姆yu4 小时前
基于python大数据的高校舆情监测系统的设计与实现
大数据·开发语言·python·分享·分析·舆情
Cory.眼4 小时前
Python爬虫实战:从入门到进阶
开发语言·爬虫·python
qq_422152574 小时前
Token到底是什么?Tokenizer分词机制与中文token开销入门科普
人工智能·python·深度学习
buyue__4 小时前
Python实现连接MySQL数据库并执行目录下的所有SQL文件,遇到错误时终止执行。
python·mysql
SuperByteMaster5 小时前
autosar 架构脚本提示语
python
Zane19945 小时前
钻石继承调用哪个方法?一文讲透 MRO 与 C3 线性化算法
后端·python