当前位置:网站首页>报错: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)
边栏推荐
- 【愚公系列】2022年07月 .NET架构班 085-微服务专题 Abp vNext微服务网关
- PMP 项目质量管理
- 基于STM32设计的UNO卡牌游戏(双人、多人对战)
- Message queue MySQL table for storing message data
- Interview Blitz 69: Is TCP Reliable?Why?
- 故乡的素描画
- typescript25 - type assertion
- 高数 | 【重积分】线面积分880例题
- MySQL3
- Write a method to flatten an array and deduplicate and sort it incrementally
猜你喜欢

Input input box cursor automatically jumps to the last bug after the previous input

typescript23-元组

typescript27 - what about enumeration types

【愚公系列】2022年07月 Go教学课程 024-函数

leetcode:126. Word Solitaire II

safari浏览器怎么导入书签

Simulation of Active anti-islanding-AFD Active Anti-islanding Model Based on Simulink

The difference between scheduleWithFixedDelay and scheduleAtFixedRate

【愚公系列】2022年07月 Go教学课程 025-递归函数

mysql中解决存储过程表名通过变量传递的方法
随机推荐
【愚公系列】2022年07月 Go教学课程 024-函数
2022-07-31: Given a graph with n points and m directed edges, you can use magic to turn directed edges into undirected edges, such as directed edges from A to B, with a weight of 7.After casting the m
25. 这三道常见的面试题,你有被问过吗?
【愚公系列】2022年07月 Go教学课程 023-Go容器之列表
August 22 Promotion Ambassador Extra Reward Rules
怀念故乡的面条
Advice given by experts with four years of development experience in Flutter tutorial
typescript23-元组
A way to deal with infinite debugger
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
25. Have you been asked these three common interview questions?
Mysql基础篇(Mysql数据类型)
Mysql中的数据类型和运算符
typescript22-接口继承
雪糕和轮胎
博客系统(完整版)
safari浏览器怎么导入书签
认真对待每一个时刻
风险策略调优中重要的三步分析法
Flutter Tutorial 02 Introduction to Flutter Desktop Program Development Tutorial Run hello world (tutorial includes source code)