随笔分类 - Python
摘要:1、一般要同时遍历数组的索引和元素需要先确定数组的长度length(元素个数),然后使用range函数来生成数组的索引,最后使用该索引来访问数组的元素。 具体做法如下: 结果: 2、使用enumerate函数可以很方便的做到以上功能 结果:
阅读全文
摘要:第一种办法: 输出结果: 第二种办法: 输出结果:
阅读全文
摘要:1、图像转换为矩阵 2、矩阵转换为图像
阅读全文
摘要:Image.fromarray(matrix).show()
阅读全文
摘要:创建一个3X3的矩阵并对其赋值: 运行结果:
阅读全文
摘要:由于tab和空格混用而导致的问题,解决办法如下: 在SubLime中View中的Identation中的Convert Indentitation to Spaces即可
阅读全文
摘要:运行结果:
阅读全文
摘要:保存 利用这种方法,保存文件的后缀名字一定会被置为.npy 读取
阅读全文
摘要:TypeError: ( 'An update must have the same type as the original shared variable ( shared_var=W, shared_var.type=TensorType(float32,matrix), update_val=Elemwise{sub,no_inplace}.0,...
阅读全文
摘要:http://phunter.farbox.com/post/mxnet-tutorial1 http://phunter.farbox.com/post/mxnet-tutorial2
阅读全文
摘要:The goal is both to offer a quick reference for new and old users and to provide also a set of exercices for those who teach. If you remember having a
阅读全文
摘要:dataset = scipy.io.loadmat('F:\test_data.mat') 报错 IOError: [Errno 22] invalid mode ('rb') or filename: 'C 解决办法:读取路径前加r即可 dataset = scipy.io.loadmat(r'
阅读全文

浙公网安备 33010602011771号