@@ -5,104 +5,114 @@ applying the function to every element in the array. This is typically
55much more efficient than expressing the same operation as a Python loop."""
66
77def acos ():
8- """Computes the inverse cosine function"""
9- ...
8+ """Computes the inverse cosine function"""
9+ ...
1010
1111def acosh ():
12- """Computes the inverse hyperbolic cosine function"""
13- ...
12+ """Computes the inverse hyperbolic cosine function"""
13+ ...
1414
1515def asin ():
16- """Computes the inverse sine function"""
17- ...
16+ """Computes the inverse sine function"""
17+ ...
1818
1919def asinh ():
20- """Computes the inverse hyperbolic sine function"""
21- ...
20+ """Computes the inverse hyperbolic sine function"""
21+ ...
2222
2323def around (a , * , decimals ):
24- """Returns a new float array in which each element is rounded to
25- ``decimals`` places."""
26- ...
24+ """Returns a new float array in which each element is rounded to
25+ ``decimals`` places."""
26+ ...
2727
2828def atan ():
29- """Computes the inverse tangent function; the return values are in the
30- range [-pi/2,pi/2]."""
31- ...
29+ """Computes the inverse tangent function; the return values are in the
30+ range [-pi/2,pi/2]."""
31+ ...
3232
3333def atan2 (y ,x ):
34- """Computes the inverse tangent function of y/x; the return values are in
35- the range [-pi, pi]."""
36- ...
34+ """Computes the inverse tangent function of y/x; the return values are in
35+ the range [-pi, pi]."""
36+ ...
3737
3838def atanh ():
39- """Computes the inverse hyperbolic tangent function"""
40- ...
39+ """Computes the inverse hyperbolic tangent function"""
40+ ...
4141
4242def ceil ():
43- """Rounds numbers up to the next whole number"""
44- ...
43+ """Rounds numbers up to the next whole number"""
44+ ...
4545
4646def cos ():
47- """Computes the cosine function"""
48- ...
47+ """Computes the cosine function"""
48+ ...
4949
5050def erf ():
51- """Computes the error function, which has applications in statistics"""
52- ...
51+ """Computes the error function, which has applications in statistics"""
52+ ...
5353
5454def erfc ():
55- """Computes the complementary error function, which has applications in statistics"""
56- ...
55+ """Computes the complementary error function, which has applications in statistics"""
56+ ...
5757
5858def exp ():
59- """Computes the exponent function."""
60- ...
59+ """Computes the exponent function."""
60+ ...
6161
6262def expm1 ():
63- """Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the `exp` function."""
64- ...
63+ """Computes $e^x-1$. In certain applications, using this function preserves numeric accuracy better than the `exp` function."""
64+ ...
6565
6666def floor ():
67- """Rounds numbers up to the next whole number"""
68- ...
67+ """Rounds numbers up to the next whole number"""
68+ ...
6969
7070def gamma ():
71- """Computes the gamma function"""
72- ...
71+ """Computes the gamma function"""
72+ ...
7373
7474def lgamma ():
75- """Computes the natural log of the gamma function"""
76- ...
75+ """Computes the natural log of the gamma function"""
76+ ...
7777
7878def log ():
79- """Computes the natural log"""
80- ...
79+ """Computes the natural log"""
80+ ...
8181
8282def log10 ():
83- """Computes the log base 10"""
84- ...
83+ """Computes the log base 10"""
84+ ...
8585
8686def log2 ():
87- """Computes the log base 2"""
88- ...
87+ """Computes the log base 2"""
88+ ...
8989
9090def sin ():
91- """Computes the sine"""
92- ...
91+ """Computes the sine"""
92+ ...
9393
9494def sinh ():
95- """Computes the hyperbolic sine"""
96- ...
95+ """Computes the hyperbolic sine"""
96+ ...
9797
9898def sqrt ():
99- """Computes the square root"""
100- ...
99+ """Computes the square root"""
100+ ...
101101
102102def tan ():
103- """Computes the tangent"""
104- ...
103+ """Computes the tangent"""
104+ ...
105105
106106def tanh ():
107- """Computes the hyperbolic tangent"""
108- ...
107+ """Computes the hyperbolic tangent"""
108+ ...
109+
110+ def vectorise (f , * , otypes = None ):
111+ """
112+ :param callable f: The function to wrap
113+ :param otypes: List of array types that may be returned by the function. None is intepreted to mean the return value is float.
114+
115+ Wrap a Python function `f` so that it can be applied to arrays.
116+
117+ The callable must return only values of the types specified by otypes, or the result is undefined."""
118+ ...
0 commit comments