NumPy 數學函數_函數

來源:互聯網
上載者:User

https://docs.scipy.org/doc/numpy/reference/routines.math.html 三角函數(Trigonometric) Function Describe sin(x[, out]) 正弦值 cos(x[, out]) 餘弦值 tan(x[, out]) 正切值 arcsin(x[, out]) 反正弦 arccos(x[, out]) 反餘弦 arctan(x[, out]) 反正切 hypot(x1, x2[, out]) 求直角三角形斜邊 arctan2(x1, x2[, out]) Element-wise arc tangent of x1/x2 choosing the quadrant correctly. degrees(x[, out]) 弧度求角度 radians(x[, out]) 角度求弧度 unwrap(p[, discont, axis]) Unwrap by changing deltas between values to 2*pi complement. deg2rad(x[, out]) 角度求弧度 rad2deg(x[, out]) 弧度求角度 雙曲線函數(Hyperbolic) Function Describe sinh(x[, out]) 雙曲線正弦 cosh(x[, out]) 雙曲線餘弦 tanh(x[, out]) 雙曲線正切 arcsinh(x[, out]) 反雙曲線正弦 arccosh(x[, out]) 反雙曲線餘弦 arctanh(x[, out]) 反雙曲線正切 四捨五入(Rounding) Function Describe around(a[, decimals, out]) 以給定的小數位進行四捨五入 round_(a[, decimals, out]) 以給定的小數位進行四捨五入,等同於around rint(x[, out]) 四捨五入到整數 fix(x[, y]) 向0取整,正數向下取整,負數向上取整 floor(x[, out]) 向下取整 ceil(x[, out]) 向上取整 trunc(x[, out]) 取整數部分 和、積、差異(Sums、Products、Differences) Function Describe prod(a[, axis, dtype, out, keepdims]) 求積 sum(a[, axis, dtype, out, keepdims]) 求和 nanprod(a[, axis, dtype, out, keepdims]) 求積,預設值為1 nansum(a[, axis, dtype, out, keepdims]) 求和,預設值為0 cumprod(a[, axis, dtype, out]) 累積 cumsum(a[, axis, dtype, out]) 累和 nancumprod(a[, axis, dtype, out]) 累積,預設為1 nancumsum(a[, axis, dtype, out]) 累和,預設為0 diff(a[, n, axis]) out[n] = a[n+1] - a[n] ediff1d(ary[, to_end, to_begin]) The differences between consecutive elements of an array. gradient(f, *varargs, **kwargs) Return the gradient of an N-dimensional array. cross(a, b[, axisa, axisb, axisc, axis]) Return the cross product of two (arrays of) vectors. trapz(y[, x, dx, axis]) Integrate along the given axis using the composite trapezoidal rule. 指數、對數函數(Exponents&Logarithm) Function Describe exp(x[, out]) 指數 expm1(x[, out]) exp(x) - 1 exp2(x[, out]) 2**x log(x[, out]) 對數 log10(x[, out]) 以10為底對數 log2(x[, out]) 以2為底對數. log1p(x[, out]) exp(x) - 1 logaddexp(x1, x2[, out]) Logarithm of the sum of exponentiations of the inputs. logaddexp2(x1, x2[, out]) Logarithm of the sum of exponentiations of the inputs in base-2. 算術運算 Function Describe add(x1, x2[, out]) 加法 reciprocal(x[, out]) 倒數 negative(x[, out]) 負數 multiply(x1, x2[, out]) 乘法 divide(x1, x2[, out]) 除法 power(x1, x2[, out]) 冪運算 subtract(x1, x2[, out]) 減法 true_divide(x1, x2[, out]) 真除法 / floor_divide(x1, x2[, out]) 向下取整除法 // fmod(x1, x2[, out]) 求餘 mod(x1, x2[, out]) 求餘,餘數為正 modf(x[, out1, out2]) 分別返回整數和餘數 remainder(x1, x2[, out]) 和mod相同 其他(Miscellaneous) Function Describe convolve(a, v[, mode]) Returns the discrete, linear convolution of two one-dimensional sequences. clip(a, a_min, a_max[, out]) 求某一範圍的值 sqrt(x[, out]) 開平方 cbrt(x[, out]) 開立方 square(x[, out]) 求平方 absolute(x[, out]) 絕對值 fabs(x[, out]) 絕對值 sign(x[, out]) 標記數位正負零 maximum(x1, x2[, out]) 求最大值 minimum(x1, x2[, out]) 求最小值 fmax(x1, x2[, out]) 求最大值 fmin(x1, x2[, out]) 求最小值 nan_to_num(x) 替換空值 real_if_close(a[, tol]) If complex input returns a real array if complex parts are close to zero. interp(x, xp, fp[, left, right, period]) One-dimensional linear interpolation. Other special functions Floating point routines Handling complex numbers

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.