当前位置:网站首页>One dimensional vector transpose point multiplication np dot
One dimensional vector transpose point multiplication np dot
2022-07-05 08:39:00 【Aii parson】
import numpy as np
a = np.array([1, 2])
a.shape = (1,2)# The second latitude 1 It's empty. , Only when it is specified can the row vector be converted into column vector smoothly
print(a)
print(a.transpose())
print(np.dot(a,a.transpose()))
print("**************************")
c = np.array([1, 2])
b = c.reshape(len(c),1)# Put the vector reshape once , In this way, the purpose of one-dimensional vector and one-dimensional vector transpose and multiply as a matrix
print(b.shape)
print(b)边栏推荐
- MySQL MHA high availability cluster
- STM32---IIC
- Esphone retrofits old fans
- Illustration of eight classic pointer written test questions
- 【日常训练--腾讯精选50】557. 反转字符串中的单词 III
- 【日常訓練--騰訊精選50】557. 反轉字符串中的單詞 III
- Basic number theory - factors
- Shell script
- Typical low code apaas manufacturer cases
- How to write cover letter?
猜你喜欢

猜谜语啦(10)

实例008:九九乘法表

Yolov4 target detection backbone

Guess riddles (4)

猜谜语啦(4)

Matlab tips (28) fuzzy comprehensive evaluation

如何写Cover Letter?

Old Wang's esp8266 and old Wu's ws2818 light strip

Run菜单解析
Example 001: the number combination has four numbers: 1, 2, 3, 4. How many three digits can be formed that are different from each other and have no duplicate numbers? How many are each?
随机推荐
Example 009: pause output for one second
剑指 Offer 06. 从尾到头打印链表
Various types of questions judged by prime numbers within 100 (C language)
Guess riddles (3)
Lori remote control LEGO motor
Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
实例006:斐波那契数列
關於線性穩壓器的五個設計細節
Guess riddles (9)
Example 007: copy data from one list to another list.
Arduino+a4988 control stepper motor
Guess riddles (5)
One question per day - replace spaces
Guess riddles (10)
Is the security account given by Yixue school safe? Where can I open an account
Cinq détails de conception du régulateur de tension linéaire
287. 寻找重复数-快慢指针
Mathematical modeling: factor analysis
MATLAB skills (28) Fuzzy Comprehensive Evaluation
[three tier architecture and JDBC summary]