关于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
相关推荐
青山如墨雨如画1 小时前
【北邮-无线通信中的人工智能】物理层技术中AI的应用实践:基于KNN的调制识别(1)理论基础
人工智能·python·机器学习·matlab·jupyter
MATLAB代码顾问1 小时前
Python Matplotlib数据可视化实战指南
python·信息可视化·matplotlib
AI 编程助手GPT2 小时前
用 Python 做一个世界杯赛前分析脚本:以巴西 vs 摩洛哥为例
开发语言·网络·人工智能·python·chatgpt
万事大吉CC2 小时前
Python 笔试输入模板总结
python·算法
Java患者·2 小时前
《Python 人脸识别入门实践:从人脸检测到人脸比对完整实现》
开发语言·python·opencv·目标检测·计算机视觉·目标跟踪·视觉检测
宸丶一2 小时前
Day 10:LangGraph - Agent 的图执行引擎
java·windows·python
weixin_307779132 小时前
Python写入Shell文件使用Linux系统的换行符
linux·开发语言·python·自动化
zmzb01033 小时前
Python课后习题训练记录Day130
开发语言·python
高洁013 小时前
医疗行业的数字孪生革命
python·机器学习·数据挖掘·transformer·知识图谱
MATLAB代码顾问3 小时前
Python Pandas数据分析入门指南
python·数据分析·pandas