鍍金池/ 問答/Python  網(wǎng)絡(luò)安全/ python的numpy怎么求向量外積?

python的numpy怎么求向量外積?

是向量的外積,得到的也是一個向量,不是一個數(shù)值。
找了半天沒找到。。。
圖片描述

回答
編輯回答
離魂曲
import numpy as np
a = np.array([1,2,3])
b = np.array([3,2,1])
np.cross(a, b)

參考:https://docs.scipy.org/doc/nu...

2018年2月19日 05:43