当前位置:网站首页>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)
边栏推荐
- How to manage the performance of R & D team?
- How can fresh students write resumes to attract HR and interviewers
- Weidongshan Internet of things learning lesson 1
- Various types of questions judged by prime numbers within 100 (C language)
- QEMU demo makefile analysis
- Guess riddles (9)
- Several problems to be considered and solved in the design of multi tenant architecture
- 实例004:这天第几天 输入某年某月某日,判断这一天是这一年的第几天?
- Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
- [nas1] (2021cvpr) attentivenas: improving neural architecture search via attentive sampling (unfinished)
猜你喜欢
随机推荐
Various types of questions judged by prime numbers within 100 (C language)
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
猜谜语啦(9)
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
Explore the authentication mechanism of StarUML
整形的分类:short in long longlong
每日一题——输入一个日期,输出它是该年的第几天
STM32 --- configuration of external interrupt
TypeScript手把手教程,简单易懂
GEO数据库中搜索数据
Example 009: pause output for one second
Sword finger offer 06 Print linked list from end to end
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
Meizu Bluetooth remote control temperature and humidity access homeassistant
[three tier architecture]
leetcode - 445. Add two numbers II
QEMU STM32 vscode debugging environment configuration
Detailed summary of FIO test hard disk performance parameters and examples (with source code)
MySQL之MHA高可用集群
Weidongshan Internet of things learning lesson 1