当前位置:网站首页>Numpy——2. Shape of array
Numpy——2. Shape of array
2022-07-07 19:14:00 【Hair will grow again without it】
The shape of the array
View the shape of the array
a.shape()
You can judge how many dimensions the array is by the number of returned values
Modify the shape of the array
a.reshape(x, y)
Return value but not modified a Arraya.flatten()
Turn the array directly into one dimension>
The calculation of array
Calculation of arrays and numbers
Broadcast mechanism
When calculating an array and a number , Apply this number to each element of the array , In fact, this number is expanded into the dimension of the sum array , Row number , An array with the same number of columns , Then do the operation on the corresponding element
Arrays and the calculation of arrays
identical shape Array of The calculation of , Directly add, subtract, multiply and divide the corresponding elements
Different shape Array of The calculation of , If it's two-dimensional , Rows and columns must have the same dimension , The other dimension is 1. If it is 3 One dimension minus one two dimension , Also look at rows and columns
It is also a broadcasting mechanism , It will expand the small one dimension of the row or column to the large one
example A two-dimensional
example The three dimensional
边栏推荐
- 咋吃都不胖的朋友,Nature告诉你原因:是基因突变了
- Redis publishing and subscription
- Cadre de validation des données Apache bval réutilisé
- 【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的
- Save the memory of the model! Meta & UC Berkeley proposed memvit. The modeling time support is 30 times longer than the existing model, and the calculation amount is only increased by 4.5%
- 高温火烧浑不怕,钟薛高想留清白在人间
- Uvalive – 4621 CAV greed + analysis "suggestions collection"
- 5billion, another master fund was born in Fujian
- coming! Gaussdb (for Cassandra) new features appear
- PTA 1102 teaching Super Champion volume
猜你喜欢
The performance and efficiency of the model that can do three segmentation tasks at the same time is better than maskformer! Meta & UIUC proposes a general segmentation model with better performance t
Business experience in virtual digital human
Micro service remote debug, nocalhost + rainbow micro service development second bullet
How to estimate the value of "not selling pens" Chenguang?
面试唯品会实习测试岗、抖音实习测试岗【真实投稿】
2022.07.02
高温火烧浑不怕,钟薛高想留清白在人间
Continuous test (CT) practical experience sharing
Will low code help enterprises' digital transformation make programmers unemployed?
[Tawang methodology] Tawang 3W consumption strategy - U & a research method
随机推荐
5billion, another master fund was born in Fujian
How to estimate the value of "not selling pens" Chenguang?
Static routing configuration
cmd命令进入MySQL时报服务名或者命令错误(傻瓜式教学)
testing and SQA_动态白盒測试[通俗易懂]
来了!GaussDB(for Cassandra)新特性亮相
First time in China! The language AI strength of this Chinese enterprise is recognized as No.2 in the world! Second only to Google
直播预约通道开启!解锁音视频应用快速上线的秘诀
For friends who are not fat at all, nature tells you the reason: it is a genetic mutation
Mathematical analysis_ Notes_ Chapter 11: Fourier series
UVALive – 4621 Cav 贪心 + 分析「建议收藏」
6. About JWT
3.关于cookie
Wechat web debugging 8.0.19 replace the X5 kernel with xweb, so the X5 debugging method can no longer be used. Now there is a solution
Seize Jay Chou
Teach your sister to write the message queue hand in hand
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
博睿数据入选《2022爱分析 · IT运维厂商全景报告》
2022-07-04 matlab reads video frames and saves them