circuitpython/shared-bindings/ulab/vector/__init__.pyi

119 lines
2.6 KiB
Python
Raw Normal View History

2020-05-14 18:57:35 -04:00
"""Element-by-element functions
These functions can operate on numbers, 1-D arrays, or 2-D arrays by
applying the function to every element in the array. This is typically
much more efficient than expressing the same operation as a Python loop."""
def acos():
"""Computes the inverse cosine function"""
...
2020-05-14 18:57:35 -04:00
def acosh():
"""Computes the inverse hyperbolic cosine function"""
...
2020-05-14 18:57:35 -04:00
def asin():
"""Computes the inverse sine function"""
...
2020-05-14 18:57:35 -04:00
def asinh():
"""Computes the inverse hyperbolic sine function"""
...
2020-05-14 18:57:35 -04:00
def around(a, *, decimals):
"""Returns a new float array in which each element is rounded to
``decimals`` places."""
...
2020-05-14 18:57:35 -04:00
def atan():
"""Computes the inverse tangent function; the return values are in the
range [-pi/2,pi/2]."""
...
2020-05-14 18:57:35 -04:00
def atan2(y,x):
"""Computes the inverse tangent function of y/x; the return values are in
the range [-pi, pi]."""
...
2020-05-14 18:57:35 -04:00
def atanh():
"""Computes the inverse hyperbolic tangent function"""
...
2020-05-14 18:57:35 -04:00
def ceil():
"""Rounds numbers up to the next whole number"""
...
2020-05-14 18:57:35 -04:00
def cos():
"""Computes the cosine function"""
...
2020-05-14 18:57:35 -04:00
def erf():
"""Computes the error function, which has applications in statistics"""
...
2020-05-14 18:57:35 -04:00
def erfc():
"""Computes the complementary error function, which has applications in statistics"""
...
2020-05-14 18:57:35 -04:00
def exp():
"""Computes the exponent function."""
...
2020-05-14 18:57:35 -04:00
def expm1():
"""Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the `exp` function."""
...
2020-05-14 18:57:35 -04:00
def floor():
"""Rounds numbers up to the next whole number"""
...
2020-05-14 18:57:35 -04:00
def gamma():
"""Computes the gamma function"""
...
2020-05-14 18:57:35 -04:00
def lgamma():
"""Computes the natural log of the gamma function"""
...
2020-05-14 18:57:35 -04:00
def log():
"""Computes the natural log"""
...
2020-05-14 18:57:35 -04:00
def log10():
"""Computes the log base 10"""
...
2020-05-14 18:57:35 -04:00
def log2():
"""Computes the log base 2"""
...
2020-05-14 18:57:35 -04:00
def sin():
"""Computes the sine"""
...
2020-05-14 18:57:35 -04:00
def sinh():
"""Computes the hyperbolic sine"""
...
2020-05-14 18:57:35 -04:00
def sqrt():
"""Computes the square root"""
...
2020-05-14 18:57:35 -04:00
def tan():
"""Computes the tangent"""
...
2020-05-14 18:57:35 -04:00
def tanh():
"""Computes the hyperbolic tangent"""
...
2020-06-01 10:16:55 -04:00
def vectorize(f, *, otypes=None):
"""
:param callable f: The function to wrap
:param otypes: List of array types that may be returned by the function. None is intepreted to mean the return value is float.
2020-06-01 12:02:51 -04:00
Wrap a Python function ``f`` so that it can be applied to arrays.
The callable must return only values of the types specified by otypes, or the result is undefined."""
...