当前位置:网站首页>Numpy----np. Tile() function parsing
Numpy----np. Tile() function parsing
2022-06-28 02:06:00 【Rookies should love learning】
Numpy:np.tile() Function analysis
master np.tile() The syntax of the function
This function treats the input as a whole , Make a copy
1. One dimensional copy of the array
print("***********************")
import numpy as np
a = [2,4,6]
b = np.tile(a,3)
print(b)
print("***********************")
Will array a Look as a whole , Copy 3 Input after times 
2. Perform two-dimensional operations on the array
print("***********************")
import numpy as np
a = [2,4,6]
b = np.tile(a,(2,2))
print(b)
print("***********************")
take a As a whole , become 2 That's ok 2 Array of columns copied to b, Printout obtained 
3. Transpose the array
print("***********************")
import numpy as np
a = [2,4,6]
b = np.tile(a,(2,2)).T
print(b)
print("***********************")

4. Comprehensive application
print("***********************")
import numpy as np
a = [2,4,6]
b = np.tile(a,(2,2)).T + np.tile((5,10),(6,1))
print(b)
print("***********************")

边栏推荐
- OS模块与OS.path 模块的学习
- 解决ionic4 使用hammerjs手势 press 事件,页面无法滚动问题
- Numpy----np.tile()函数解析
- 什么是数字化?什么是数字化转型?为什么企业选择数字化转型?
- Some problems in awk
- Appium自动化测试基础— 补充:App的包名(appPackage)和启动名(appActivity)
- 一张图弄懂 MIT,BSD,Apache几种开源协议之间的区别
- To understand what is synchronous, asynchronous, serial, parallel, concurrent, process, thread, and coroutine
- Adobe Premiere foundation - sound adjustment (volume correction, noise reduction, telephone tone, pitch shifter, parameter equalizer) (XVIII)
- MySQL十种锁,一篇文章带你全解析
猜你喜欢

Raspberry pie realizes intelligent cooling by temperature control fan

【永艺XY椅】试用体验

Drug interaction prediction based on learning size adaptive molecular substructure

ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)

评价——灰色关联分析

Adobe Premiere foundation - sound adjustment (volume correction, noise reduction, telephone tone, pitch shifter, parameter equalizer) (XVIII)

嵌入式必学!硬件资源接口详解——基于ARM AM335X开发板 (下)

Using redis bitmap to realize personnel online monitoring

What is digitalization? What is digital transformation? Why do enterprises choose digital transformation?

Hi, you have a code review strategy to check!
随机推荐
药物发现综述-03-分子设计与优化
ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)
引用层reboot后的大体流程
Lmsoc: a socially sensitive pre training method
Numpy----np.meshgrid()
Intensive reading of transformer thesis paragraph by paragraph
深入解析kubernetes controller-runtime
药物发现综述-01-药物发现概述
【永艺XY椅】试用体验
向excel中导入mysql中的数据表
Hi, you have a code review strategy to check!
[embedded foundation] serial port communication
将某数据库N多表名作为另外一张表中某一列得值(范围可以是别的数据库中得某张表)
Evaluation - rank sum ratio comprehensive evaluation
How to understand query, key and value in transformer
Implementation of timed tasks in laravel framework
网络爬虫是什么
[Yocto RM] 4 - Source Directory Structure
The interviewer asked: this point of JS
Web3 技术初体验以及相关学习资料