python tile函数
来源:互联网 发布:java中的访问修饰符 编辑:程序博客网 时间:2024/05/22 16:51
在看机器学习实战这本书时,遇到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))#在列方向上重复[0,0]3次,行2次 array([[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]])
0 0
- python numpy.tile函数
- Python中的tile函数
- Python&Numpy:tile函数
- python中tile()函数
- Python tile函数
- python numpy.tile函数
- python tile函数
- python之tile函数
- 【python】tile函数
- python中tile()函数
- Python-Numpy函数-tile函数
- 【python】tile函数简单介绍
- Python--tile函数简单介绍
- python: numpy --函数 tile用法
- Python-Numpy的tile函数
- python tile()函数的使用
- Python numpy函数:tile()
- python中的tile函数和sum函数
- Android NDK(三):JNI 字符串
- LeetCode 27. Remove Element 题解 —— Java
- hdu 1026
- JAVA回顾
- 算法分析与设计第五周习题:95. Unique Binary Search Trees II
- python tile函数
- C语言实现TCP服务器---模型(二)
- hdu 2612 Find a way
- 最长上升子序列(LIS) -最长公共子序列(LCS)
- 《ACM程序设计》书中题目W
- 怎么在Linux下启动mysql
- L题
- win7 64+python2.7.12安装numpy+scipy+matplotlib+scikit-learn
- 超全的机器学习、深度学习视频课程和讲义的百度网盘下载