纽比·利纳格·诺姆给出了奇怪的结果

2024-09-27 09:32:46 发布

您现在位置:Python中文网/ 问答频道 /正文

以下是错误:

print numpy.linalg.norm(2) # returns 2
print numpy.linalg.norm(2, np.inf) # returns error,
print numpy.linalg.norm(2, np.inf) # returns the same error:

ValueError: Improper number of dimensions to norm.

如何在非numpy数组输入中使用上述规范?在


Tags: ofthenumpynormnumber错误nperror

热门问题