2017-06-19 27 views
-2

我可以问关于这个语法的更多信息吗?python .T.dot()numpy语法理解

l1.T.dot(l2_delta) 

我印象np.dot(X,Y)下把两个阵列作为参数

这是否线意味着转置L1中,然后乘以l2_delta仍然?

感谢

+0

.DOT()可以被称为上的ndarray的方法 - HTTPS ://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.dot.html np.dot是等效函数 - https://docs.scipy.org/doc/numpy/reference/generated/ numpy.dot.html – jeremycg

+0

这是一个数组方法'np.ndarray.dot',而不是模块级函数'np.dot' –

回答

2

你的你的代码是干什么的理解是正确的。

你的困惑,是因为我们认为有两种numpy的的 “点” 功能来:

类似地,这里的属于ndarray对象 “.T” 功能:https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.T.html

+0

'属于对象'的函数通常称为方法。 – hpaulj