python tile
来源:互联网 发布:淘宝食品流通许可证 编辑:程序博客网 时间:2024/06/05 03:22
tile函数
在看机器学习实战这本书时,遇到numpy.tile(A,B)函数,愣是没看懂怎么回事,装了numpy模块后,实验了几把,原来是这样子:
重复A,B次,这里的B可以时int类型也可以是远组类型。
- >>> import numpy
- >>> numpy.tile([0,0],5)#在列方向上重复[0,0]5次,默认行1次
- array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
- >>> numpy.tile([0,0],(1,1))#在列方向上重复[0,0]1次,行1次
- array([[0, 0]])
- >>> numpy.tile([0,0],(2,1))#在列方向上重复[0,0]1次,行2次
- array([[0, 0],
- [0, 0]])
- >>> numpy.tile([0,0],(3,1))
- array([[0, 0],
- [0, 0],
- [0, 0]])
- >>> numpy.tile([0,0],(1,3))#在列方向上重复[0,0]3次,行1次
- array([[0, 0, 0, 0, 0, 0]])
- >>> numpy.tile([0,0],(2,3))<span style="font-family: Arial, Helvetica, sans-serif;">#在列方向上重复[0,0]3次,行2次</span>
- array([[0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0]])
0 0
- python tile
- python tile([],())
- python numpy.tile函数
- Python中的tile函数
- Python&Numpy:tile函数
- python中tile()函数
- tile---python--numpy
- Python tile函数
- python numpy.tile函数
- python tile函数
- usage of python tile
- python之tile函数
- 【python】tile函数
- python中tile()函数
- Numpy.tile() (Python)
- 【python】tile函数简单介绍
- python shape tile **(幂运算)
- Python--tile函数简单介绍
- pat 1031. 查验身份证(15)
- 转:Bug的类型
- Spark Worker原理和源码剖析解密
- oracle实例的内存(SGA和PGA)调整,优化之原理和方法
- Java-线程
- python tile
- s5pv210 datasheet_system_memory
- 2016年团体程序设计天梯赛-模拟赛
- 【Scala】响应式编程思想
- HUST——1110雪碧(简单DFS)
- 计数排序
- 利用随机数随机生成指定位数的字符串
- mongodb增删改查基本操作
- 高精度除法(高精除以低精)——一步一步算法篇