
在看别人代码的时候,发现如下用法,从没见过,有没有大佬指导一下?
def get_most_similar_fast(self, v): scores = self.normed(v) @ self.embs._normalized_matrix.T scores = (scores + 1) / 2 return scores 中间的 @符号是什么意思?
1 pythonbug 2019-04-20 00:24:20 +08:00 via iPhone 没见过 |
2 Tony042 2019-04-20 00:25:09 +08:00 矩阵相乘,The @ (at) operator is intended to be used for matrix multiplication. No builtin Python types implement this operator. From Python 3.7.3 documentation. |
3 azh7138m 2019-04-20 00:26:32 +08:00 via Android |
4 azh7138m 2019-04-20 00:28:56 +08:00 via Android 其实搜 python @ meaning quora 出现在首页的那个回答,也说的这个 |