当前位置:网站首页>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
边栏推荐
- Pasqal首席技术官:模拟量子计算率先为工业带来量子优势
- Nat address translation
- Redis publishing and subscription
- How to choose the appropriate automated testing tools?
- 微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
- Complete e-commerce system
- 企业展厅设计中常用的三种多媒体技术形式
- 50亿,福建又诞生一只母基金
- 面试唯品会实习测试岗、抖音实习测试岗【真实投稿】
- Learn open62541 -- [67] add custom enum and display name
猜你喜欢

I feel cheated. Wechat tests the function of "size number" internally, and two wechat can be registered with the same mobile number

Numpy——axis

Basic operation of chain binary tree (implemented in C language)

Micro service remote debug, nocalhost + rainbow micro service development second bullet

RISCV64
![学习open62541 --- [67] 添加自定义Enum并显示名字](/img/98/e5e25af90b3f98c2be11d7d21e5ea6.png)
学习open62541 --- [67] 添加自定义Enum并显示名字

Standard ACL and extended ACL

Desci: is decentralized science the new trend of Web3.0?

Simple configuration of single arm routing and layer 3 switching

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
随机推荐
Differences between rip and OSPF and configuration commands
50亿,福建又诞生一只母基金
App capture of charles+postern
2022-07-04 matlab读取视频帧并保存
Micro service remote debug, nocalhost + rainbow micro service development second bullet
[Blue Bridge Cup training 100 questions] sort scratch from small to large. Blue Bridge Cup scratch competition special prediction programming question centralized training simulation exercise question
[tpm2.0 principle and Application guide] Chapter 16, 17 and 18
2022年推荐免费在线接收短信平台(国内、国外)
How to choose the appropriate automated testing tools?
Reuse of data validation framework Apache bval
Charles+Postern的APP抓包
Creative changes brought about by the yuan universe
How to implement safety practice in software development stage
Former richest man, addicted to farming
企业展厅设计中常用的三种多媒体技术形式
直播预约通道开启!解锁音视频应用快速上线的秘诀
Classification and application of enterprise MES Manufacturing Execution System
Redis集群与扩展
DeSci:去中心化科学是Web3.0的新趋势?
Scientists have observed for the first time that the "electron vortex" helps to design more efficient electronic products

>





