pytutorial/numpy/math_functions/README.md

43 lines
3.4 KiB
Markdown
Raw Normal View History

# [Mathematical functions](https://numpy.org/doc/stable/reference/routines.math.html)
**I will focus on the important ones.**
## [Trigonometric functions](https://numpy.org/doc/stable/reference/routines.math.html#trigonometric-functions)
|||
|---|---|
|[sin](https://numpy.org/doc/stable/reference/generated/numpy.sin.html#numpy.sin)(x, /[, out, where, casting, order, ...])|Trigonometric sine, element-wise.|
|[cos](https://numpy.org/doc/stable/reference/generated/numpy.cos.html#numpy.cos)(x, /[, out, where, casting, order, ...])|Cosine element-wise.|
|[tan](https://numpy.org/doc/stable/reference/generated/numpy.tan.html#numpy.tan)(x, /[, out, where, casting, order, ...])|Compute tangent element-wise.|
|[arcsin](https://numpy.org/doc/stable/reference/generated/numpy.arcsin.html#numpy.arcsin)(x, /[, out, where, casting, order, ...])|Inverse sine, element-wise.|
|[arccos](https://numpy.org/doc/stable/reference/generated/numpy.arccos.html#numpy.arccos)(x, /[, out, where, casting, order, ...])|Trigonometric inverse cosine, element-wise.|
|arctan(x, /[, out, where, casting, order, ...])|Trigonometric inverse tangent, element-wise.|
|hypot(x1, x2, /[, out, where, casting, ...])|Given the "legs" of a right triangle, return its hypotenuse.|
|[arctan2](https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html#numpy.arctan2)(x1, x2, /[, out, where, casting, ...])|Element-wise arc tangent of x1/x2 choosing the quadrant correctly.|
|degrees(x, /[, out, where, casting, order, ...])|Convert angles from radians to degrees.|
|radians(x, /[, out, where, casting, order, ...])|Convert angles from degrees to radians.|
|unwrap(p[, discont, axis, period])|Unwrap by taking the complement of large deltas with respect to the period.|
|deg2rad(x, /[, out, where, casting, order, ...])|Convert angles from degrees to radians.|
|rad2deg(x, /[, out, where, casting, order, ...])|Convert angles from radians to degrees.|
## [Hyperbolic functions](https://numpy.org/doc/stable/reference/routines.math.html#hyperbolic-functions)
[here](https://numpy.org/doc/stable/reference/routines.math.html#hyperbolic-functions)
## [Rounding](https://numpy.org/doc/stable/reference/routines.math.html#rounding)
|||
|---|---|
|[round](https://numpy.org/doc/stable/reference/generated/numpy.round.html#numpy.round)(a[, decimals, out])|Evenly round to the given number of decimals.|
|[around](https://numpy.org/doc/stable/reference/generated/numpy.around.html#numpy.around)(a[, decimals, out])|Round an array to the given number of decimals.|
|[rint](https://numpy.org/doc/stable/reference/generated/numpy.rint.html#numpy.rint)(x, /[, out, where, casting, order, ...])|Round elements of the array to the nearest integer.|
|[fix](https://numpy.org/doc/stable/reference/generated/numpy.fix.html#numpy.fix)(x[, out])|Round to nearest integer towards zero.|
|[floor](https://numpy.org/doc/stable/reference/generated/numpy.floor.html#numpy.floor)(x, /[, out, where, casting, order, ...])|Return the floor of the input, element-wise.|
|[ceil](https://numpy.org/doc/stable/reference/generated/numpy.ceil.html#numpy.ceil)(x, /[, out, where, casting, order, ...])|Return the ceiling of the input, element-wise.|
|[trunc](https://numpy.org/doc/stable/reference/generated/numpy.trunc.html#numpy.trunc)(x, /[, out, where, casting, order, ...])|Return the truncated value of the input, element-wise.|
## [Sums, products, differences](https://numpy.org/doc/stable/reference/routines.math.html#sums-products-differences)