【python】matplotlib绘图显示不了中文,且没有SimHei、FangSong等字体

您所在的位置:网站首页 美人为馅在线观看免费完整版电视剧 【python】matplotlib绘图显示不了中文,且没有SimHei、FangSong等字体

【python】matplotlib绘图显示不了中文,且没有SimHei、FangSong等字体

2024-06-16 23:00| 来源: 网络整理| 查看: 265

【python】TypeError: unhashable type: ‘numpy.ndarray’

qq_39436520: import scipy import numpy as np if __name__ == '__main__': one_hot = scipy.io.loadmat(r"C:\Users\dell\PycharmProjects\pythonProject7\DBN-SVM\cwru\train_label.mat") # 10*10的矩阵 对角线上是1 print('np.eye(10)\n', one_hot) # 两种方法 传一维的numpy数组和列表都可以 label = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) one_hot_label = one_hot[label.astype(np.int32)] # 表示选取矩阵上面的第几行 # label = [1, 4, 8, 9, 5, 0] # one_hot_label = one_hot[label] print('-----------------one_hot--------------------') print(one_hot_label) label = [one_label.tolist().index(1) for one_label in one_hot_label] # 找到下标是1的位置 print('------------------label---------------------') print(label) 我这个该怎么改

删除Jupyter中产生的.ipynb_checkpoints

Limche: 删不掉啊

【opencv】Layout of the output array img is incompatible with cv::Mat

zzm19910422: 在内存中不连续的mat上使用 cv2.rectangle会报这个错,使用np.ascontiguousarray可以解决不连续问题

【pytorch】cuDNN error: CUDNN_STATUS_INTERNAL_ERROR终终终终于解决了!

HelenXIV: 我的问题已解决 可供参考 在发生该问题后我检查我的资源占用,发现显卡显存在没有任务的情况下占用还是很高,因为跑的benchmark,可能是上一个任务异常终止导致资源异常持续占用结果就是导致当前任务显存资源不足,直接重启机器就行了

【pytorch】cuDNN error: CUDNN_STATUS_INTERNAL_ERROR终终终终于解决了!

kings177: 我是pytorch版本问题,更新了就好了,应该是显卡驱动自动更新或者被服务器的其他人更新了



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3