|
31 | 31 |
|
32 | 32 | __all__ = ['zeros', 'ones', 'maximum', 'minimum', 'stack', 'concatenate', 'arange', 'argmax',
|
33 | 33 | 'clip', 'add', 'subtract', 'multiply', 'divide', 'mod', 'power', 'split', 'swapaxes',
|
34 |
| - 'expand_dims', 'tile', 'linspace', 'sin', 'cos', 'sinh', 'cosh', 'log10', 'sqrt', |
| 34 | + 'expand_dims', 'tile', 'sin', 'cos', 'sinh', 'cosh', 'log10', 'sqrt', |
35 | 35 | 'abs', 'exp', 'arctan']
|
36 | 36 |
|
37 | 37 |
|
@@ -538,7 +538,7 @@ def mean(self, axis=None, dtype=None, out=None, keepdims=False): # pylint: disa
|
538 | 538 |
|
539 | 539 | def cumsum(self, axis=None, dtype=None, out=None):
|
540 | 540 | """Return the cumulative sum of the elements along the given axis."""
|
541 |
| - return _mx_np_op.cumsum(self, axis=axis, dtype=dtype, out=out) |
| 541 | + raise NotImplementedError |
542 | 542 |
|
543 | 543 | def max(self, axis=None, out=None, keepdims=False): # pylint: disable=arguments-differ
|
544 | 544 | """Return the maximum along a given axis."""
|
@@ -1327,66 +1327,6 @@ def tile(A, reps):
|
1327 | 1327 | return _npi.tile(A, reps)
|
1328 | 1328 |
|
1329 | 1329 |
|
1330 |
| -@set_module('mxnet.symbol.numpy') |
1331 |
| -def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0, **kwargs): # pylint: disable=too-many-arguments |
1332 |
| - """Return evenly spaced numbers over a specified interval. |
1333 |
| -
|
1334 |
| - Returns num evenly spaced samples, calculated over the interval [start, stop]. |
1335 |
| - The endpoint of the interval can optionally be excluded. |
1336 |
| -
|
1337 |
| - Parameters |
1338 |
| - ---------- |
1339 |
| - start : array_like |
1340 |
| - The starting value of the sequence. |
1341 |
| - stop : array_like |
1342 |
| - The end value of the sequence, unless endpoint is set to False. In |
1343 |
| - that case, the sequence consists of all but the last of num + 1 |
1344 |
| - evenly spaced samples, so that stop is excluded. Note that the step |
1345 |
| - size changes when endpoint is False. |
1346 |
| - num : int, optional |
1347 |
| - Number of samples to generate. Default is 50. Must be non-negative. |
1348 |
| - endpoint : bool, optional |
1349 |
| - If True, stop is the last sample. Otherwise, it is not included. |
1350 |
| - Default is True. |
1351 |
| - retstep: bool, optional |
1352 |
| - If True, return (samples, step), where step is the spacing between samples. |
1353 |
| - dtype: dtype, optional |
1354 |
| - The type of the output array. If dtype is not given, infer the data |
1355 |
| - type from the other input arguments. |
1356 |
| - axis : int, optional |
1357 |
| - The axis in the result to store the samples. Relevant only if start or |
1358 |
| - stop are array-like. By default (0), the samples will be along a new |
1359 |
| - axis inserted at the beginning. Use -1 to get an axis at the end. |
1360 |
| - Returns |
1361 |
| - ------- |
1362 |
| - samples : ndarray |
1363 |
| - There are num equally spaced samples in the closed interval |
1364 |
| - `[start, stop]` or the half-open interval `[start, stop)` |
1365 |
| - (depending on whether endpoint is True or False). |
1366 |
| - step : float, optional |
1367 |
| - Only returned if retstep is True |
1368 |
| - Size of spacing between samples. |
1369 |
| -
|
1370 |
| - Notes |
1371 |
| - ----- |
1372 |
| - This function currently does not support ``start`` and ``stop`` as ndarrays and |
1373 |
| - axis could only be 0 now. |
1374 |
| - """ |
1375 |
| - if isinstance(start, (list, _np.ndarray)) or \ |
1376 |
| - isinstance(stop, (list, _np.ndarray)): |
1377 |
| - raise NotImplementedError('start and stop only support int') |
1378 |
| - if axis != 0: |
1379 |
| - raise NotImplementedError("the function only support axis 0") |
1380 |
| - ctx = kwargs.pop('ctx', current_context()) |
1381 |
| - if ctx is None: |
1382 |
| - ctx = current_context() |
1383 |
| - if retstep: |
1384 |
| - step = (stop - start) / (num - 1) |
1385 |
| - return (_npi.linspace(start=start, stop=stop, num=num, endpoint=endpoint, ctx=ctx, dtype=dtype), step) |
1386 |
| - else: |
1387 |
| - return _npi.linspace(start=start, stop=stop, num=num, endpoint=endpoint, ctx=ctx, dtype=dtype) |
1388 |
| - |
1389 |
| - |
1390 | 1330 | def _unary_func_helper(x, fn_array, fn_scalar, out=None, **kwargs):
|
1391 | 1331 | """Helper function for unary operators.
|
1392 | 1332 |
|
|
0 commit comments