当前位置:网站首页>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)
边栏推荐
- 【三层架构】
- QEMU demo makefile analysis
- Agile project management of project management
- 关于线性稳压器的五个设计细节
- Example 010: time to show
- 剑指 Offer 05. 替换空格
- STM32 --- GPIO configuration & GPIO related library functions
- Bluebridge cup internet of things competition basic graphic tutorial - clock selection
- Esp8266 interrupt configuration
- 猜谜语啦(11)
猜你喜欢
Guess riddles (3)
剑指 Offer 06. 从尾到头打印链表
leetcode - 445. 两数相加 II
Business modeling of software model | overview
实例009:暂停一秒输出
Business modeling of software model | stakeholders
319. 灯泡开关
Business modeling of software model | vision
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
猜谜语啦(7)
随机推荐
Business modeling of software model | stakeholders
实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
關於線性穩壓器的五個設計細節
猜谜语啦(7)
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
STM32 --- configuration of external interrupt
猜谜语啦(11)
整形的分类:short in long longlong
Detailed summary of FIO test hard disk performance parameters and examples (with source code)
How can fresh students write resumes to attract HR and interviewers
猜谜语啦(8)
STM32 --- NVIC interrupt
Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
MySQL之MHA高可用集群
【三层架构及JDBC总结】
第十八章 使用工作队列管理器(一)
Buildroot system for making raspberry pie cm3
[noi simulation] juice tree (tree DP)
STM32 lights up the 1.8-inch screen under Arduino IDE
Sword finger offer 05 Replace spaces