关于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
相关推荐
zc.z1 小时前
Context Engineering:深度学习知识点
python·prompt·上下文工程
5G微创业1 小时前
短视频去水印接口怎么对接?一篇讲清 GET 参数、返回字段与多语言示例
python·小程序·api·短视频·去水印
布语world2 小时前
某东pc滑块分析
前端·javascript·网络·python·安全
m0_646429972 小时前
Python pytest 单元测试基础
python
DeepVisionary2 小时前
从1秒多压到0.39秒,Gemini 4 Live靠先应声再干活,把语音延迟降了3倍
python·自动化
Web3&Basketball2 小时前
Playwright实战:27B网页智能体评测3步
python·大模型·浏览器自动化·playwright·网页智能体·评测口径·molmoweb
zc.z2 小时前
RAG (一):从底层原理、Naive RAG 到企业级项目开发与面试实战
人工智能·python·rag
王者鳜錸3 小时前
【中英】-Android离线语音听写-讯飞 AIKit源码实现
开发语言·python·智能手机·安卓·离线中英识别
BK贝壳6 小时前
浮点值也能挂进混合数组:bool-hybrid-array 的 FloatHybridArray 构造、下标与追加本机实测
开发语言·数据结构·python·性能优化·numpy
钱栈up15 小时前
长安汽车把海外年销钉在100万辆,2030年要翻到200万——出海从故事变成基建
爬虫·python·数据分析