关于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
相关推荐
2301_822375445 分钟前
Python虚拟环境(venv)完全指南:隔离项目依赖
jvm·数据库·python
2301_790300965 分钟前
Python类型提示(Type Hints)详解
jvm·数据库·python
Eric.Lee202111 分钟前
SLAM 路径规划的安全走廊实现
python·机器人·ros·路径规划·避障·安全走廊
小W与影刀RPA18 分钟前
【影刀RPA】:智能过滤敏感词,高效输出表格
大数据·人工智能·python·低代码·自动化·rpa·影刀rpa
Yorlen_Zhang23 分钟前
python Tkinter Frame 深度解析与实战指南
开发语言·python
2401_8384725124 分钟前
Python多线程与多进程:如何选择?(GIL全局解释器锁详解)
jvm·数据库·python
2301_8223636040 分钟前
Python单元测试(unittest)实战指南
jvm·数据库·python
叫我辉哥e11 小时前
新手进阶Python:办公看板升级交互式可视化+移动端适配+多终端同步
开发语言·python
m0_561359671 小时前
Python面向对象编程(OOP)终极指南
jvm·数据库·python
zhangfeng11331 小时前
deepseek部署和训练的PyTorch CUDA Transformers Accelerate PEFT稳定版本呢推荐
人工智能·pytorch·python