@@ -134,9 +134,6 @@ def argmin(tensor, axis=None):
134
134
@emulate_keepdims
135
135
@deco_axis_expand
136
136
def any (tensor , axis = None , * , where = NoValue ):
137
- if where is not NoValue :
138
- raise NotImplementedError
139
-
140
137
axis = _util .allow_only_single_axis (axis )
141
138
142
139
if axis is None :
@@ -149,9 +146,6 @@ def any(tensor, axis=None, *, where=NoValue):
149
146
@emulate_keepdims
150
147
@deco_axis_expand
151
148
def all (tensor , axis = None , * , where = NoValue ):
152
- if where is not NoValue :
153
- raise NotImplementedError
154
-
155
149
axis = _util .allow_only_single_axis (axis )
156
150
157
151
if axis is None :
@@ -164,36 +158,24 @@ def all(tensor, axis=None, *, where=NoValue):
164
158
@emulate_keepdims
165
159
@deco_axis_expand
166
160
def max (tensor , axis = None , initial = NoValue , where = NoValue ):
167
- if initial is not NoValue or where is not NoValue :
168
- raise NotImplementedError
169
-
170
- result = tensor .amax (axis )
171
- return result
161
+ return tensor .amax (axis )
172
162
173
163
174
164
@emulate_keepdims
175
165
@deco_axis_expand
176
166
def min (tensor , axis = None , initial = NoValue , where = NoValue ):
177
- if initial is not NoValue or where is not NoValue :
178
- raise NotImplementedError
179
-
180
- result = tensor .amin (axis )
181
- return result
167
+ return tensor .amin (axis )
182
168
183
169
184
170
@emulate_keepdims
185
171
@deco_axis_expand
186
172
def ptp (tensor , axis = None ):
187
- result = tensor .amax (axis ) - tensor .amin (axis )
188
- return result
173
+ return tensor .amax (axis ) - tensor .amin (axis )
189
174
190
175
191
176
@emulate_keepdims
192
177
@deco_axis_expand
193
178
def sum (tensor , axis = None , dtype = None , initial = NoValue , where = NoValue ):
194
- if initial is not NoValue or where is not NoValue :
195
- raise NotImplementedError
196
-
197
179
assert dtype is None or isinstance (dtype , torch .dtype )
198
180
199
181
if dtype == torch .bool :
@@ -210,9 +192,6 @@ def sum(tensor, axis=None, dtype=None, initial=NoValue, where=NoValue):
210
192
@emulate_keepdims
211
193
@deco_axis_expand
212
194
def prod (tensor , axis = None , dtype = None , initial = NoValue , where = NoValue ):
213
- if initial is not NoValue or where is not NoValue :
214
- raise NotImplementedError
215
-
216
195
axis = _util .allow_only_single_axis (axis )
217
196
218
197
if dtype == torch .bool :
@@ -229,9 +208,6 @@ def prod(tensor, axis=None, dtype=None, initial=NoValue, where=NoValue):
229
208
@emulate_keepdims
230
209
@deco_axis_expand
231
210
def mean (tensor , axis = None , dtype = None , * , where = NoValue ):
232
- if where is not NoValue :
233
- raise NotImplementedError
234
-
235
211
dtype = _atleast_float (dtype , tensor .dtype )
236
212
237
213
is_half = dtype == torch .float16
@@ -253,9 +229,6 @@ def mean(tensor, axis=None, dtype=None, *, where=NoValue):
253
229
@emulate_keepdims
254
230
@deco_axis_expand
255
231
def std (tensor , axis = None , dtype = None , ddof = 0 , * , where = NoValue ):
256
- if where is not NoValue :
257
- raise NotImplementedError
258
-
259
232
dtype = _atleast_float (dtype , tensor .dtype )
260
233
tensor = _util .cast_if_needed (tensor , dtype )
261
234
result = tensor .std (dim = axis , correction = ddof )
@@ -266,9 +239,6 @@ def std(tensor, axis=None, dtype=None, ddof=0, *, where=NoValue):
266
239
@emulate_keepdims
267
240
@deco_axis_expand
268
241
def var (tensor , axis = None , dtype = None , ddof = 0 , * , where = NoValue ):
269
- if where is not NoValue :
270
- raise NotImplementedError
271
-
272
242
dtype = _atleast_float (dtype , tensor .dtype )
273
243
tensor = _util .cast_if_needed (tensor , dtype )
274
244
result = tensor .var (dim = axis , correction = ddof )
@@ -387,9 +357,6 @@ def quantile(
387
357
# Here we choose to work out-of-place because why not.
388
358
pass
389
359
390
- if interpolation is not None :
391
- raise ValueError ("'interpolation' argument is deprecated; use 'method' instead" )
392
-
393
360
if not a .dtype .is_floating_point :
394
361
dtype = _dtypes_impl .default_float_dtype
395
362
a = a .to (dtype )
0 commit comments