summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorLars Buitinck <larsmans@gmail.com>2014-11-19 23:01:45 +0100
committerLars Buitinck <larsmans@gmail.com>2014-11-19 23:02:34 +0100
commit7f45d4248d6a311aa8558525ca8c0dc1317540f6 (patch)
tree8176fd643c9d19d60ec05984e1388775592ab7a6 /doc/source
parentff8a1469fabbb91579a3da95fc6c1f750e6ee82a (diff)
downloadnumpy-7f45d4248d6a311aa8558525ca8c0dc1317540f6.tar.gz
DOC: fix example in NpyIter docs that didn't compile
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/c-api.iterator.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/source/reference/c-api.iterator.rst b/doc/source/reference/c-api.iterator.rst
index e6a21c1b3..94fac14c7 100644
--- a/doc/source/reference/c-api.iterator.rst
+++ b/doc/source/reference/c-api.iterator.rst
@@ -89,6 +89,7 @@ number of non-zero elements in an array.
NpyIter* iter;
NpyIter_IterNextFunc *iternext;
char** dataptr;
+ npy_intp nonzero_count;
npy_intp* strideptr,* innersizeptr;
/* Handle zero-sized arrays specially */
@@ -136,7 +137,7 @@ number of non-zero elements in an array.
/* The location of the inner loop size which the iterator may update */
innersizeptr = NpyIter_GetInnerLoopSizePtr(iter);
- /* The iteration loop */
+ nonzero_count = 0;
do {
/* Get the inner loop data/stride/count values */
char* data = *dataptr;