我有m的值:
array([[0.91992515, 0.978894 , 0.98183531, 0.99085009, 0.98576438,
0.99062014, 0.9931621 , 0.99088091, 0.92711413, 0.78091824],
[0.92729372, 0.97037023, 0.98044407, 0.97998279, 0.97441202,
0.99145925, 0.98606282, 0.99012506, 0.94134074, 0.79332185],
[0.92185014, 0.95902878, 0.97929859, 0.98272425, 0.98107767,
0.98998082, 0.99233872, 0.9882673 , 0.92030007, 0.80480009],
[0.91204637, 0.96461374, 0.97577399, 0.98063707, 0.96949238,
0.99135023, 0.98836327, 0.98504972, 0.97783262, 0.77362221],
[0.93386984, 0.97553176, 0.97664225, 0.98727471, 0.98023629,
0.98472446, 0.98551005, 0.98410082, 0.9551242 , 0.77246934],
[0.93045634, 0.97707605, 0.99085528, 0.98433924, 0.98237419,
0.99572343, 0.99173379, 0.98824054, 0.96632308, 0.76564348],
[0.93682766, 0.97289765, 0.98349541, 0.99275345, 0.98538131,
0.99283469, 0.99232531, 0.98699528, 0.95912874, 0.91011888],
[0.89040715, 0.96955484, 0.97332346, 0.96521449, 0.97545224,
0.98275667, 0.98541254, 0.97983998, 0.90709436, 0.88003486],
[0.95064926, 0.9512195 , 0.96981376, 0.9641239 , 0.98085016,
0.95860326, 0.9453789 , 0.89857048, 0.94533682, 0.67875481],
[0.66791672, 0.69540793, 0.7906791 , 0.74079674, 0.75139421,
0.75080746, 0.68582624, 0.63543165, 0.59522635, 0.65718603]])
当我执行:
sns_plot = sns.heatmap(m)
我得到以下错误:
ValueError: left cannot be >= right
我做错了什么?
2条答案
按热度按时间gdrx4gfi1#
使用np.array,这对我来说非常好用
dohp0rv52#
当我遇到这个错误时(用一个相当数组,shape(24,34)),问题是像素密度不够高。第一次调用
fig = plt.figure(dpi=500)
为我修复了它(500是任意的,但大于默认值100)