:mod:`ulab.vector` ================== .. py:module:: ulab.vector .. autoapi-nested-parse:: Element-by-element functions These functions can operate on numbers, 1-D iterables, 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. .. function:: acos() Computes the inverse cosine function .. function:: acosh() Computes the inverse hyperbolic cosine function .. function:: asin() Computes the inverse sine function .. function:: asinh() Computes the inverse hyperbolic sine function .. function:: around(a, \*, decimals) Returns a new float array in which each element is rounded to ``decimals`` places. .. function:: atan() Computes the inverse tangent function; the return values are in the range [-pi/2,pi/2]. .. function:: atan2(y, x) Computes the inverse tangent function of y/x; the return values are in the range [-pi, pi]. .. function:: atanh() Computes the inverse hyperbolic tangent function .. function:: ceil() Rounds numbers up to the next whole number .. function:: cos() Computes the cosine function .. function:: cosh() Computes the hyperbolic cosine function .. function:: erf() Computes the error function, which has applications in statistics .. function:: erfc() Computes the complementary error function, which has applications in statistics .. function:: exp() Computes the exponent function. .. function:: expm1() Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the `exp` function. .. function:: floor() Rounds numbers up to the next whole number .. function:: gamma() Computes the gamma function .. function:: lgamma() Computes the natural log of the gamma function .. function:: log() Computes the natural log .. function:: log10() Computes the log base 10 .. function:: log2() Computes the log base 2 .. function:: sin() Computes the sine function .. function:: sinh() Computes the hyperbolic sine .. function:: sqrt() Computes the square root .. function:: tan() Computes the tangent .. function:: tanh() Computes the hyperbolic tangent .. function:: 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 interpreted to mean the return value is float. 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.