This is an automated email from the ASF dual-hosted git repository.
nswamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 6ab06e6 Fixed Sparse astype doc string formatting error (#13171)
6ab06e6 is described below
commit 6ab06e6d0cecbe6ba8cb510ce65864bdb59b0e45
Author: Rakesh Vasudevan <[email protected]>
AuthorDate: Fri Nov 9 22:57:56 2018 -0800
Fixed Sparse astype doc string formatting error (#13171)
---
python/mxnet/ndarray/sparse.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/mxnet/ndarray/sparse.py b/python/mxnet/ndarray/sparse.py
index 7b4cc90..3d18a59 100644
--- a/python/mxnet/ndarray/sparse.py
+++ b/python/mxnet/ndarray/sparse.py
@@ -195,7 +195,8 @@ class BaseSparseNDArray(NDArray):
return self.tostype('default').asnumpy()
def astype(self, dtype, copy=True):
- """Returns a copy of the array after casting to a specified type.
+ """Return a copy of the array after casting to a specified type.
+
Parameters
----------
dtype : numpy.dtype or str
@@ -205,6 +206,7 @@ class BaseSparseNDArray(NDArray):
allocated ndarray on the same context. If this is set to
`False`, and the dtype requested is the same as the ndarray's
dtype, the ndarray is returned instead of a copy.
+
Examples
--------
>>> x = mx.nd.sparse.zeros('row_sparse', (2,3), dtype='float32')