关于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
相关推荐
chushiyunen3 小时前
python中的@Property和@Setter
java·开发语言·python
禾小西3 小时前
Java中使用正则表达式核心解析
java·python·正则表达式
yoyo_zzm3 小时前
JAVA (Springboot) i18n国际化语言配置
java·spring boot·python
weixin_408099675 小时前
图片去水印 API 接口实战:网站如何实现自动去水印(Python / PHP / C#)
图像处理·人工智能·python·c#·php·api·图片去水印
yyk的萌5 小时前
AI 应用开发工程师基础学习计划
开发语言·python·学习·ai·lua
qq_196976177 小时前
python的sql解析库-sqlparse
数据库·python·sql
:mnong7 小时前
Superpowers 项目设计分析
java·c语言·c++·python·c#·php·skills
a里啊里啊7 小时前
测试开发面试题
开发语言·chrome·python·xpath
豆沙糕7 小时前
Python异步编程从入门到实战:结合RAG流式回答全解析
开发语言·python·面试