@@ -97,6 +97,138 @@ def cos(self: Any, a: Tensor) -> Tensor:
97
97
"Backend '{}' has not implemented `cos`." .format (self .name )
98
98
)
99
99
100
+ def acos (self : Any , a : Tensor ) -> Tensor :
101
+ """
102
+ Return the acos of a tensor ``a``.
103
+
104
+ :param a: tensor in matrix form
105
+ :type a: Tensor
106
+ :return: acos of ``a``
107
+ :rtype: Tensor
108
+ """
109
+ raise NotImplementedError (
110
+ "Backend '{}' has not implemented `acos`." .format (self .name )
111
+ )
112
+
113
+ def acosh (self : Any , a : Tensor ) -> Tensor :
114
+ """
115
+ Return the acosh of a tensor ``a``.
116
+
117
+ :param a: tensor in matrix form
118
+ :type a: Tensor
119
+ :return: acosh of ``a``
120
+ :rtype: Tensor
121
+ """
122
+ raise NotImplementedError (
123
+ "Backend '{}' has not implemented `acosh`." .format (self .name )
124
+ )
125
+
126
+ def asin (self : Any , a : Tensor ) -> Tensor :
127
+ """
128
+ Return the acos of a tensor ``a``.
129
+
130
+ :param a: tensor in matrix form
131
+ :type a: Tensor
132
+ :return: asin of ``a``
133
+ :rtype: Tensor
134
+ """
135
+ raise NotImplementedError (
136
+ "Backend '{}' has not implemented `asin`." .format (self .name )
137
+ )
138
+
139
+ def asinh (self : Any , a : Tensor ) -> Tensor :
140
+ """
141
+ Return the asinh of a tensor ``a``.
142
+
143
+ :param a: tensor in matrix form
144
+ :type a: Tensor
145
+ :return: asinh of ``a``
146
+ :rtype: Tensor
147
+ """
148
+ raise NotImplementedError (
149
+ "Backend '{}' has not implemented `asinh`." .format (self .name )
150
+ )
151
+
152
+ def atan (self : Any , a : Tensor ) -> Tensor :
153
+ """
154
+ Return the atan of a tensor ``a``.
155
+
156
+ :param a: tensor in matrix form
157
+ :type a: Tensor
158
+ :return: atan of ``a``
159
+ :rtype: Tensor
160
+ """
161
+ raise NotImplementedError (
162
+ "Backend '{}' has not implemented `atan`." .format (self .name )
163
+ )
164
+
165
+ def atan2 (self : Any , y : Tensor , x : Tensor ) -> Tensor :
166
+ """
167
+ Return the atan of a tensor ``y``/``x``.
168
+
169
+ :param a: tensor in matrix form
170
+ :type a: Tensor
171
+ :return: atan2 of ``a``
172
+ :rtype: Tensor
173
+ """
174
+ raise NotImplementedError (
175
+ "Backend '{}' has not implemented `atan2`." .format (self .name )
176
+ )
177
+
178
+ def cosh (self : Any , a : Tensor ) -> Tensor :
179
+ """
180
+ Return the cosh of a tensor ``a``.
181
+
182
+ :param a: tensor in matrix form
183
+ :type a: Tensor
184
+ :return: cosh of ``a``
185
+ :rtype: Tensor
186
+ """
187
+ raise NotImplementedError (
188
+ "Backend '{}' has not implemented `cosh`." .format (self .name )
189
+ )
190
+
191
+ def tan (self : Any , a : Tensor ) -> Tensor :
192
+ """
193
+ Return the tan of a tensor ``a``.
194
+
195
+ :param a: tensor in matrix form
196
+ :type a: Tensor
197
+ :return: tan of ``a``
198
+ :rtype: Tensor
199
+ """
200
+ raise NotImplementedError (
201
+ "Backend '{}' has not implemented `tan`." .format (self .name )
202
+ )
203
+
204
+ def tanh (self : Any , a : Tensor ) -> Tensor :
205
+ """
206
+ Return the tanh of a tensor ``a``.
207
+
208
+ :param a: tensor in matrix form
209
+ :type a: Tensor
210
+ :return: tanh of ``a``
211
+ :rtype: Tensor
212
+ """
213
+ raise NotImplementedError (
214
+ "Backend '{}' has not implemented `tanh`." .format (self .name )
215
+ )
216
+
217
+ def sinh (self : Any , a : Tensor ) -> Tensor :
218
+ """
219
+ Return the sinh of a tensor ``a``.
220
+
221
+ :param a: tensor in matrix form
222
+ :type a: Tensor
223
+ :return: sinh of ``a``
224
+ :rtype: Tensor
225
+ """
226
+ raise NotImplementedError (
227
+ "Backend '{}' has not implemented `sinh`." .format (self .name )
228
+ )
229
+
230
+ # acos acosh asin asinh atan atan2 atanh cosh (cos) tan tanh (sin) sinh
231
+
100
232
def abs (self : Any , a : Tensor ) -> Tensor :
101
233
"""
102
234
Return the elementwise abs value of a matrix ``a``.
@@ -283,6 +415,28 @@ def tile(self: Any, a: Tensor, rep: Tensor) -> Tensor:
283
415
"Backend '{}' has not implemented `tile`." .format (self .name )
284
416
)
285
417
418
+ def mean (
419
+ self : Any ,
420
+ a : Tensor ,
421
+ axis : Optional [Sequence [int ]] = None ,
422
+ keepdims : bool = False ,
423
+ ) -> Tensor :
424
+ """
425
+ Compute the arithmetic mean for ``a`` along the specified ``axis``.
426
+
427
+ :param a: tensor to take average
428
+ :type a: Tensor
429
+ :param axis: the axis to take mean, defaults to None indicating sum over flatten array
430
+ :type axis: Optional[Sequence[int]], optional
431
+ :param keepdims: _description_, defaults to False
432
+ :type keepdims: bool, optional
433
+ :return: _description_
434
+ :rtype: Tensor
435
+ """
436
+ raise NotImplementedError (
437
+ "Backend '{}' has not implemented `mean`." .format (self .name )
438
+ )
439
+
286
440
def min (self : Any , a : Tensor , axis : Optional [int ] = None ) -> Tensor :
287
441
"""
288
442
Return the minimum of an array or minimum along an axis.
0 commit comments