当前位置:网站首页>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)
边栏推荐
- Count the number of inputs (C language)
- Example 007: copy data from one list to another list.
- TypeScript手把手教程,简单易懂
- EA introduction notes
- 亿学学堂给的证券账户安不安全?哪里可以开户
- Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
- 【三层架构及JDBC总结】
- Some pitfalls of win10 network sharing
- 实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
- Mathematical modeling: factor analysis
猜你喜欢
Array integration initialization (C language)
Arduino+a4988 control stepper motor
实例010:给人看的时间
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
实例006:斐波那契数列
[three tier architecture]
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
Business modeling of software model | stakeholders
Agile project management of project management
Business modeling of software model | vision
随机推荐
Old Wang's esp8266 and old Wu's ws2818 light strip
Count the number of inputs (C language)
整形的分类:short in long longlong
Guess riddles (4)
Several problems to be considered and solved in the design of multi tenant architecture
[three tier architecture and JDBC summary]
实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
[formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
Sword finger offer 06 Print linked list from end to end
Detailed summary of FIO test hard disk performance parameters and examples (with source code)
leetcode - 445. Add two numbers II
Reasons for the insecurity of C language standard function scanf
Esphone retrofits old fans
Search data in geo database
How to manage the performance of R & D team?
2020-05-21
猜谜语啦(142)
Shift operation of complement
An enterprise information integration system
Explore the authentication mechanism of StarUML