def sum_squared(X):
"""Compute norm of an array
Parameters
----------
X : array
Data whose norm must be found
Returns
-------
value : float
Sum of squares of the input array X
"""
X_flat = X.ravel(order='F' if np.isfortran(X) else 'C')
return np.dot(X_flat, X_flat)
utils.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录