当前位置:网站首页>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)
边栏推荐
- Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
- STM32 single chip microcomputer -- volatile keyword
- Business modeling | process of software model
- Various types of questions judged by prime numbers within 100 (C language)
- L298N module use
- Keil use details -- magic wand
- STM32 --- serial port communication
- Some pitfalls of win10 network sharing
- Google sitemap files for rails Projects - Google sitemap files for rails projects
- Business modeling of software model | vision
猜你喜欢
剑指 Offer 06. 从尾到头打印链表
Array integration initialization (C language)
Keil use details -- magic wand
实例006:斐波那契数列
Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
How apaas is applied in different organizational structures
Arduino+a4988 control stepper motor
STM32 --- NVIC interrupt
Briefly talk about the identification protocol of mobile port -bc1.2
STM32---ADC
随机推荐
Is the security account given by Yixue school safe? Where can I open an account
图解八道经典指针笔试题
Typical low code apaas manufacturer cases
Sword finger offer 06 Print linked list from end to end
【三层架构】
Sword finger offer 09 Implementing queues with two stacks
Count the number of inputs (C language)
How to manage the performance of R & D team?
STM32 --- NVIC interrupt
MySQL之MHA高可用集群
Stm32--- systick timer
Guess riddles (5)
Esphone Feixun DC1 soft change access homeassstant
2022.7.4-----leetcode. one thousand and two hundred
Lori remote control LEGO motor
Reasons for the insecurity of C language standard function scanf
Search data in geo database
剑指 Offer 06. 从尾到头打印链表
Matlab tips (28) fuzzy comprehensive evaluation
STM32---ADC