""" 运算符(exp,sqrt,square) """ import numpy as np print("--------------exp,sqrt,square----------------") a = np.array([1, 4, 9]) print("指数:", np.exp(a)) print("平方根:", np.sqrt(a)) print("平方:", np.square(a))
--------------exp,sqrt,square---------------- 指数: [2.71828183e+00 5.45981500e+01 8.10308393e+03] 平方根: [1. 2. 3.] 平方: [ 1 16 81]
来源:博客园
作者:Jumpkin1122
链接:https://www.cnblogs.com/jumpkin1122/p/11503578.html