当前位置:网站首页>报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
2022-08-01 04:36:00 【hi_1900】
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
修改前:
import matplotlib as plt
plt.figure()
plt.imshow(trainImages[10])
plt.colorbar()
plt.grid(False)
修改为:import matplotlib.pyplot as plt
修改后:
import matplotlib.pyplot as plt
plt.figure()
plt.imshow(trainImages[10])
plt.colorbar()
plt.grid(False)
边栏推荐
- Flutter Tutorial 02 Introduction to Flutter Desktop Program Development Tutorial Run hello world (tutorial includes source code)
- 李迟2022年7月工作生活总结
- Invalid classes inferred from unique values of `y`. Expected: [0 1 2], got [1 2 3]
- Weekly Summary (*67): Why not dare to express an opinion
- TypeScript simplifies running ts-node
- SQL Analysis of ShardingSphere
- typescript26 - literal types
- 数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》
- Input输入框光标在前输入后自动跳到最后面的bug
- Summary of mobile page optimization in seconds
猜你喜欢
typescript19-对象可选参数
怀念故乡的月亮
Input输入框光标在前输入后自动跳到最后面的bug
UE4 从鼠标位置射出射线检测
typescript21 - Comparison of Interfaces and Type Aliases
This article takes you to understand the past and present of Mimir, Grafana's latest open source project
6-23漏洞利用-postgresql代码执行利用
【愚公系列】2022年07月 Go教学课程 025-递归函数
Step by step hand tearing carousel Figure 3 (nanny level tutorial)
风险策略调优中重要的三步分析法
随机推荐
typescript21 - Comparison of Interfaces and Type Aliases
PMP 相关方管理必背总结
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
TIM登陆时提示00001(TIM00001)
「以云为核,无感极速」顶象第五代验证码
Make your Lottie support word wrapping in text fields
Write a method to flatten an array and deduplicate and sort it incrementally
Immutable
雪糕和轮胎
请问表格储存中用sql只能查询到主键列,ots sql非主键不支持吗?
怀念故乡的月亮
7 行代码搞崩溃 B 站,原因令人唏嘘!
Software Testing Interview (3)
今日睡眠质量记录68分
故乡的素描画
Excel做题记录——整数规划优化模型
微软 Win10 照片磁贴后的又一“刺客”,谷歌 Chrome 浏览器将在新标签页展示用户照片
【云原生之kubernetes实战】kubernetes集群的检测工具——popeye
lambda
Flutter Tutorial 02 Introduction to Flutter Desktop Program Development Tutorial Run hello world (tutorial includes source code)