-3

标题说明了一切,我不知何故找不到该功能。显然它在 Numpy 包中(numpy.core.umath.deg2rad),我尝试导入它但无济于事。有人愿意插话吗?

  • import numpy as np - np.deg2rad 甚至不显示
  • from numpy import* - umath.deg2rad 出现,但它引发错误,''name 'umath' is not defined''
4

1 回答 1

2
from numpy.core.umath import deg2rad
# then
deg2rad(...)

或者

import numpy as np
np.core.umath.deg2rad(...)
于 2014-04-03T14:36:10.253 回答