1.2数据可视化
Module matplotlib.cm has no binary member
Module matplotlib.cm has no binary member
fig
, ax_array
= plt
.subplots
(nrows
=10, ncols
=10, sharey
=True, sharex
=True, figsize
=(12, 12))
for r
in range(10):
for c
in range(10):
ax_array
[r
, c
].matshow
(np
.array
(sample_images
[10 * r
+ c
].reshape
((20, 20))).T
,cmap
=matplotlib
.cm
.binary
)
plt
.xticks
(np
.array
([]))
plt
.yticks
(np
.array
([]))
显示
{
"resource": "/C:/Users/GYL/Desktop/Untitled-3.py",
"owner": "python",
"code": "no-member",
"severity": 8,
"message": "Module 'matplotlib.cm' has no 'binary' member",
"source": "pylint",
"startLineNumber": 19,
"startColumn": 93,
"endLineNumber": 19,
"endColumn": 93
}
改正:
cmap
='binary'
转载请注明原文地址:https://blackberry.8miu.com/read-38988.html