From d3c176c87c99c0bf8dd84238cfbefd0bea422bde Mon Sep 17 00:00:00 2001 From: Haibin Lin Date: Mon, 21 Aug 2017 16:30:15 -0700 Subject: [PATCH] add clarification for csr (#182) * add clarification for csr * cr comments --- python/mxnet/ndarray/sparse.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/mxnet/ndarray/sparse.py b/python/mxnet/ndarray/sparse.py index da81b155e4b6..97e43f5ebe79 100644 --- a/python/mxnet/ndarray/sparse.py +++ b/python/mxnet/ndarray/sparse.py @@ -247,6 +247,9 @@ class CSRNDArray(BaseSparseNDArray): row i are stored in indices[indptr[i]:indptr[i+1]] and their corresponding values are stored in values[indptr[i]:indptr[i+1]]. + The column indices for a given row are expected to be sorted in ascending order. + Duplicate column entries for the same row are not allowed. + Example ------- >>> a = mx.nd.array([[0, 1, 0], [2, 0, 0], [0, 0, 0], [0, 0, 3]])