当前位置:网站首页>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)
边栏推荐
猜你喜欢
Guess riddles (5)
剑指 Offer 05. 替换空格
Guess riddles (9)
STM32 --- serial port communication
leetcode - 445. Add two numbers II
Arduino operation stm32
[matlab] matlab reads and writes Excel
Run menu analysis
An enterprise information integration system
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?
随机推荐
Yolov4 target detection backbone
Low code platform | apaas platform construction analysis
【三层架构】
2022.7.4-----leetcode. one thousand and two hundred
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
每日一题——输入一个日期,输出它是该年的第几天
Typical low code apaas manufacturer cases
猜谜语啦(10)
Five design details of linear regulator
Illustration of eight classic pointer written test questions
An enterprise information integration system
How to manage the performance of R & D team?
暑假第一周
STM32---ADC
Classification of plastic surgery: short in long long long
Example 003: a complete square is an integer. It is a complete square after adding 100, and it is a complete square after adding 168. What is the number?
PIP installation
关于线性稳压器的五个设计细节
Bluebridge cup internet of things competition basic graphic tutorial - clock selection
TypeScript手把手教程,简单易懂