标签:
shape函数是numpy.core.fromnumeric中的函数,它的功能是读取矩阵的长度,比如shape[0]就是读取矩阵第一维度的长度。它的输入参数可以使一个整数表示维度,也可以是一个矩阵。
使用shape需要导入numpy
tile函数位于python模块 numpy.lib.shape_base中,他的功能是重复某个数组。比如tile(A,n),功能是将数组A重复n次,构成一个新的数组
使用shape需要导入numpy
Python 学习笔记(Machine Learning In Action)
标签:
原文地址:http://www.cnblogs.com/wlc297984368/p/5748502.html