add norm operator for sparse ndarray (#9479)

* add norm(row_sparse)

* add doc

* add example in doc

* address commnts

* rebase

* add knullop check
This commit is contained in:
Haibin Lin authored and Sheng Zha committed 2018-01-20 16:03:56 -08:00
1 parent caa6250505
commit 461673736d
5 files changed
+121 -10

No files matched your search

+13 -2
View File
@@ -157,6 +157,7 @@ We summarize the interface for each class in the following sections.
CSRNDArray.sum
CSRNDArray.mean
CSRNDArray.norm
```
### Powers
@@ -237,6 +238,15 @@ We summarize the interface for each class in the following sections.
RowSparseNDArray.zeros_like
```
### Array reduction
```eval_rst
.. autosummary::
:nosignatures:
RowSparseNDArray.norm
```
### Array rounding
```eval_rst
@@ -414,6 +424,7 @@ We summarize the interface for each class in the following sections.
sum
mean
norm
```
### Rounding
@@ -492,10 +503,10 @@ We summarize the interface for each class in the following sections.
```eval_rst
.. autoclass:: mxnet.ndarray.sparse.CSRNDArray
:members: shape, context, dtype, stype, data, indices, indptr, copy, copyto, as_in_context, asscipy, asnumpy, asscalar, astype, tostype, slice, wait_to_read, zeros_like, __neg__, sum, mean, square, __getitem__, __setitem__, check_format
:members: shape, context, dtype, stype, data, indices, indptr, copy, copyto, as_in_context, asscipy, asnumpy, asscalar, astype, tostype, slice, wait_to_read, zeros_like, __neg__, sum, mean, norm, square, __getitem__, __setitem__, check_format
.. autoclass:: mxnet.ndarray.sparse.RowSparseNDArray
:members: shape, context, dtype, stype, data, indices, copy, copyto, as_in_context, asnumpy, asscalar, astype, tostype, wait_to_read, zeros_like, round, rint, fix, floor, ceil, trunc, sin, tan, arcsin, arctan, degrees, radians, sinh, tanh, arcsinh, arctanh, expm1, log1p, sqrt, square, __negative__, __getitem__, __setitem__, check_format, retain, clip, sign
:members: shape, context, dtype, stype, data, indices, copy, copyto, as_in_context, asnumpy, asscalar, astype, tostype, wait_to_read, zeros_like, round, rint, fix, floor, ceil, trunc, sin, tan, arcsin, arctan, degrees, radians, sinh, tanh, arcsinh, arctanh, expm1, log1p, sqrt, square, __negative__, norm, __getitem__, __setitem__, check_format, retain, clip, sign
.. automodule:: mxnet.ndarray.sparse
:members: