当前位置:网站首页>numpy.tile()
numpy.tile()
2022-06-26 05:48:00 【Wanderer001】
把数组沿各个方向复制,比如 a = np.array([0,1,2]), np.tile(a,(2,1))就是把a先沿x轴(就这样称呼吧)复制1倍,即没有复制,仍然是 [0,1,2]。 再把结果沿y方向复制2倍,即最终得到
array([[0,1,2],
[0,1,2]])
同理:
>>> b = np.array([[1, 2], [3, 4]])
>>> np.tile(b, 2) #沿X轴复制2倍
array([[1, 2, 1, 2],
[3, 4, 3, 4]])
>>> np.tile(b, (2, 1))#沿X轴复制1倍(相当于没有复制),再沿Y轴复制2倍
array([[1, 2],
[3, 4],
[1, 2],
[3, 4]])边栏推荐
- 劣币驱逐良币的思考
- 花生壳内网穿透映射NPM私服问题
- 机器学习 07:PCA 及其 sklearn 源码解读
- Unicloud cloud development obtains applet user openid
- Pytorch (network model training)
- Pytorch (environment, tensorboard, transforms, torchvision, dataloader)
- Ribbon load balancing service call
- [MySQL] MySQL million level data paging query method and its optimization
- MySQL数据库-01数据库概述
- 一段不离不弃的爱情
猜你喜欢

【C語言】深度剖析數據在內存中的存儲

9 common classes
Explore small program audio and video calls and interactive live broadcast from New Oriental live broadcast

Using Jenkins to perform testng+selenium+jsup automated tests and generate extendreport test reports

重载和重写

pytorch(网络模型训练)
![[C language] deep analysis of data storage in memory](/img/2e/ff0b5326d796b9436f4a10c10cfe22.png)
[C language] deep analysis of data storage in memory

Kolla ansible deploy openstack Yoga version

Could not get unknown property ‘*‘ for SigningConfig container of type org.gradle.api.internal

Pytorch (network model)
随机推荐
转帖——不要迷失在技术的海洋中
How to associate wechat applet QR code to realize two code aggregation
Ribbon负载均衡服务调用
家庭记账程序(第一版)
Day2- syntax basis and variables
原型模式,咩咩乱叫
Explore small program audio and video calls and interactive live broadcast from New Oriental live broadcast
Force buckle 875 Coco, who likes bananas
【PHP】PHP二维数组按照多个字段进行排序
MySQL database-01 database overview
How to use the tablet as the second extended screen of the PC
The model defined (modified) in pytoch loads some required pre training model parameters and freezes them
Easy to understand from the IDE, and then talk about the applet IDE
Introduction to lcm32f037 series of MCU chip for motor
力扣 875. 爱吃香蕉的珂珂
9 common classes
Kolla ansible deploy openstack Yoga version
BOM文档
[arm] add desktop application for buildreoot of rk3568 development board
There are applications related to web network request API in MATLAB (under update)