关于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
相关推荐
SilentSamsara7 小时前
HTTP 客户端实战:httpx/重试/限速/连接池/中间件设计
开发语言·网络·python·http·青少年编程·中间件·httpx
AI玫瑰助手7 小时前
Python函数:可变参数(星号args与双星号kwargs)详解
android·开发语言·python
韦胖漫谈IT7 小时前
选语言不是站队,是选适合问题的工具
java·python·ai·rust·go·技术落地
小白学大数据7 小时前
业务落地:Python 列表在 AI 接口开发中的实战应用
人工智能·爬虫·python·microsoft
清水白石0087 小时前
Python 可变对象与不可变对象深度解析:为什么 `tuple` 里可以放 `list`?
开发语言·python·list
源图客7 小时前
【亚马逊 SP-API 实战】Java 批量创建变体 Listing(父商品 + 子变体 + 独立图片)完整教程(亲测可用)
java·大数据·python
Cinthia10037 小时前
学习深度学习过程中对线性代数的几何理解
python·线性代数·机器学习
Xpower 177 小时前
Codex 桌面端更新后 Chrome 插件和 Computer Use 不可用,怎么排查和修复
前端·人工智能·chrome·python·学习
Wang ruoxi9 小时前
Pygame 小游戏——贪吃蛇
python·pygame
大数据魔法师13 小时前
Streamlit(二十三)- 教程(二)- 动态导航
python·web