bug—TypeError: only length-1 arrays can be converted to Python scalars

TypeError: only length-1 arrays can be converted to Python scalars
【bug—TypeError: only length-1 arrays can be converted to Python scalars】不能直接使用math 中得到的作用在ndarray上。
应该使用np.exp()

    推荐阅读