summaryrefslogtreecommitdiff
path: root/numpy/_array_api/elementwise_functions.py
blob: bacb733d98114a537b89682179e625a16b105618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
def abs(x, /):
    from .. import abs
    return abs(x)

def acos(x, /):
    # Note: the function name is different here
    from .. import arccos
    return arccos(x)

def acosh(x, /):
    # Note: the function name is different here
    from .. import arccosh
    return arccosh(x)

def add(x1, x2, /):
    from .. import add
    return add(x1, x2)

def asin(x, /):
    # Note: the function name is different here
    from .. import arcsin
    return arcsin(x)

def asinh(x, /):
    # Note: the function name is different here
    from .. import arcsinh
    return arcsinh(x)

def atan(x, /):
    # Note: the function name is different here
    from .. import arctan
    return arctan(x)

def atan2(x1, x2, /):
    # Note: the function name is different here
    from .. import arctan2
    return arctan2(x1, x2)

def atanh(x, /):
    # Note: the function name is different here
    from .. import arctanh
    return arctanh(x)

def bitwise_and(x1, x2, /):
    from .. import bitwise_and
    return bitwise_and(x1, x2)

def bitwise_left_shift(x1, x2, /):
    # Note: the function name is different here
    from .. import left_shift
    return left_shift(x1, x2)

def bitwise_invert(x, /):
    # Note: the function name is different here
    from .. import invert
    return invert(x)

def bitwise_or(x1, x2, /):
    from .. import bitwise_or
    return bitwise_or(x1, x2)

def bitwise_right_shift(x1, x2, /):
    # Note: the function name is different here
    from .. import right_shift
    return right_shift(x1, x2)

def bitwise_xor(x1, x2, /):
    from .. import bitwise_xor
    return bitwise_xor(x1, x2)

def ceil(x, /):
    from .. import ceil
    return ceil(x)

def cos(x, /):
    from .. import cos
    return cos(x)

def cosh(x, /):
    from .. import cosh
    return cosh(x)

def divide(x1, x2, /):
    from .. import divide
    return divide(x1, x2)

def equal(x1, x2, /):
    from .. import equal
    return equal(x1, x2)

def exp(x, /):
    from .. import exp
    return exp(x)

def expm1(x, /):
    from .. import expm1
    return expm1(x)

def floor(x, /):
    from .. import floor
    return floor(x)

def floor_divide(x1, x2, /):
    from .. import floor_divide
    return floor_divide(x1, x2)

def greater(x1, x2, /):
    from .. import greater
    return greater(x1, x2)

def greater_equal(x1, x2, /):
    from .. import greater_equal
    return greater_equal(x1, x2)

def isfinite(x, /):
    from .. import isfinite
    return isfinite(x)

def isinf(x, /):
    from .. import isinf
    return isinf(x)

def isnan(x, /):
    from .. import isnan
    return isnan(x)

def less(x1, x2, /):
    from .. import less
    return less(x1, x2)

def less_equal(x1, x2, /):
    from .. import less_equal
    return less_equal(x1, x2)

def log(x, /):
    from .. import log
    return log(x)

def log1p(x, /):
    from .. import log1p
    return log1p(x)

def log2(x, /):
    from .. import log2
    return log2(x)

def log10(x, /):
    from .. import log10
    return log10(x)

def logical_and(x1, x2, /):
    from .. import logical_and
    return logical_and(x1, x2)

def logical_not(x, /):
    from .. import logical_not
    return logical_not(x)

def logical_or(x1, x2, /):
    from .. import logical_or
    return logical_or(x1, x2)

def logical_xor(x1, x2, /):
    from .. import logical_xor
    return logical_xor(x1, x2)

def multiply(x1, x2, /):
    from .. import multiply
    return multiply(x1, x2)

def negative(x, /):
    from .. import negative
    return negative(x)

def not_equal(x1, x2, /):
    from .. import not_equal
    return not_equal(x1, x2)

def positive(x, /):
    from .. import positive
    return positive(x)

def pow(x1, x2, /):
    # Note: the function name is different here
    from .. import power
    return power(x1, x2)

def remainder(x1, x2, /):
    from .. import remainder
    return remainder(x1, x2)

def round(x, /):
    from .. import round
    return round(x)

def sign(x, /):
    from .. import sign
    return sign(x)

def sin(x, /):
    from .. import sin
    return sin(x)

def sinh(x, /):
    from .. import sinh
    return sinh(x)

def square(x, /):
    from .. import square
    return square(x)

def sqrt(x, /):
    from .. import sqrt
    return sqrt(x)

def subtract(x1, x2, /):
    from .. import subtract
    return subtract(x1, x2)

def tan(x, /):
    from .. import tan
    return tan(x)

def tanh(x, /):
    from .. import tanh
    return tanh(x)

def trunc(x, /):
    from .. import trunc
    return trunc(x)

__all__ = ['abs', 'acos', 'acosh', 'add', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'bitwise_and', 'bitwise_left_shift', 'bitwise_invert', 'bitwise_or', 'bitwise_right_shift', 'bitwise_xor', 'ceil', 'cos', 'cosh', 'divide', 'equal', 'exp', 'expm1', 'floor', 'floor_divide', 'greater', 'greater_equal', 'isfinite', 'isinf', 'isnan', 'less', 'less_equal', 'log', 'log1p', 'log2', 'log10', 'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'multiply', 'negative', 'not_equal', 'positive', 'pow', 'remainder', 'round', 'sign', 'sin', 'sinh', 'square', 'sqrt', 'subtract', 'tan', 'tanh', 'trunc']