@@ -5,104 +5,114 @@ applying the function to every element in the array. This is typically
5
5
much more efficient than expressing the same operation as a Python loop."""
6
6
7
7
def acos ():
8
- """Computes the inverse cosine function"""
9
- ...
8
+ """Computes the inverse cosine function"""
9
+ ...
10
10
11
11
def acosh ():
12
- """Computes the inverse hyperbolic cosine function"""
13
- ...
12
+ """Computes the inverse hyperbolic cosine function"""
13
+ ...
14
14
15
15
def asin ():
16
- """Computes the inverse sine function"""
17
- ...
16
+ """Computes the inverse sine function"""
17
+ ...
18
18
19
19
def asinh ():
20
- """Computes the inverse hyperbolic sine function"""
21
- ...
20
+ """Computes the inverse hyperbolic sine function"""
21
+ ...
22
22
23
23
def 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
+ ...
27
27
28
28
def 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
+ ...
32
32
33
33
def 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
+ ...
37
37
38
38
def atanh ():
39
- """Computes the inverse hyperbolic tangent function"""
40
- ...
39
+ """Computes the inverse hyperbolic tangent function"""
40
+ ...
41
41
42
42
def ceil ():
43
- """Rounds numbers up to the next whole number"""
44
- ...
43
+ """Rounds numbers up to the next whole number"""
44
+ ...
45
45
46
46
def cos ():
47
- """Computes the cosine function"""
48
- ...
47
+ """Computes the cosine function"""
48
+ ...
49
49
50
50
def erf ():
51
- """Computes the error function, which has applications in statistics"""
52
- ...
51
+ """Computes the error function, which has applications in statistics"""
52
+ ...
53
53
54
54
def 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
+ ...
57
57
58
58
def exp ():
59
- """Computes the exponent function."""
60
- ...
59
+ """Computes the exponent function."""
60
+ ...
61
61
62
62
def 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
+ ...
65
65
66
66
def floor ():
67
- """Rounds numbers up to the next whole number"""
68
- ...
67
+ """Rounds numbers up to the next whole number"""
68
+ ...
69
69
70
70
def gamma ():
71
- """Computes the gamma function"""
72
- ...
71
+ """Computes the gamma function"""
72
+ ...
73
73
74
74
def lgamma ():
75
- """Computes the natural log of the gamma function"""
76
- ...
75
+ """Computes the natural log of the gamma function"""
76
+ ...
77
77
78
78
def log ():
79
- """Computes the natural log"""
80
- ...
79
+ """Computes the natural log"""
80
+ ...
81
81
82
82
def log10 ():
83
- """Computes the log base 10"""
84
- ...
83
+ """Computes the log base 10"""
84
+ ...
85
85
86
86
def log2 ():
87
- """Computes the log base 2"""
88
- ...
87
+ """Computes the log base 2"""
88
+ ...
89
89
90
90
def sin ():
91
- """Computes the sine"""
92
- ...
91
+ """Computes the sine"""
92
+ ...
93
93
94
94
def sinh ():
95
- """Computes the hyperbolic sine"""
96
- ...
95
+ """Computes the hyperbolic sine"""
96
+ ...
97
97
98
98
def sqrt ():
99
- """Computes the square root"""
100
- ...
99
+ """Computes the square root"""
100
+ ...
101
101
102
102
def tan ():
103
- """Computes the tangent"""
104
- ...
103
+ """Computes the tangent"""
104
+ ...
105
105
106
106
def 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