当前位置:网站首页>Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
2022-07-05 08:37:00 【Wow, Kaka, negative, positive】
Numpy dimension (n, 1) and dimension (n, ) Dimension change after array addition operation of
Define a ( 100 , 1 ) (100, 1) (100,1) An array of dimensions
a = np.ones((100, 1))
a.shape

Define a ( 100 , ) (100, ) (100,) An array of dimensions
b = np.ones((100,))
b.shape

Add two arrays
(a + b).shape

summary : Be careful Numpy The middle dimension (n, 1) and dimension (n, ) The dimension after the array addition operation of becomes (n, n)
边栏推荐
- Arduino operation stm32
- Wheel 1:qcustomplot initialization template
- STM32 outputs 1PPS with adjustable phase
- Guess riddles (3)
- Various types of questions judged by prime numbers within 100 (C language)
- Bluebridge cup internet of things competition basic graphic tutorial - clock selection
- Reasons for the insecurity of C language standard function scanf
- Arduino burning program and Arduino burning bootloader
- Run menu analysis
- 287. 寻找重复数-快慢指针
猜你喜欢
AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)](/img/3b/c94b8466370f4461875c85b4f66860.png)
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)

猜谜语啦(142)
![[three tier architecture and JDBC summary]](/img/e0/13d48f2e59b445b9e28e38d45f492d.png)
[three tier architecture and JDBC summary]

Array integration initialization (C language)

剑指 Offer 09. 用两个栈实现队列

Pytorch entry record

猜谜语啦(7)

实例008:九九乘法表

Guess riddles (2)

Example 008: 99 multiplication table
随机推荐
如何写Cover Letter?
Array integration initialization (C language)
How to write cover letter?
Some pitfalls of win10 network sharing
Business modeling of software model | vision
Typical low code apaas manufacturer cases
MySQL MHA high availability cluster
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
GEO数据库中搜索数据
STM32 --- GPIO configuration & GPIO related library functions
Esphone Feixun DC1 soft change access homeassstant
Guess riddles (3)
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
leetcode - 445. 两数相加 II
MATLAB小技巧(28)模糊綜合評價
Pytorch entry record
Numpy 小坑:维度 (n, 1) 和 维度 (n, ) 数组相加运算后维度变为 (n, n)
The first week of summer vacation
猜谜语啦(9)
Briefly talk about the identification protocol of mobile port -bc1.2