def outer_product(input_array):
r'''
Takes a `NumPy` array and returns the outer (dyadic, Kronecker) product
with itself. If `input_array` is a vector :math:`\mathbf{x}`, this returns
:math:`\mathbf{x}\mathbf{x}^T`.
'''
la = len(input_array)
# return outer product as numpy array
return np.kron(input_array, input_array).reshape(la, la)
##############
# Decorators #
##############
# Main decorator for fit functions
评论列表
文章目录