From 7f45d4248d6a311aa8558525ca8c0dc1317540f6 Mon Sep 17 00:00:00 2001 From: Lars Buitinck Date: Wed, 19 Nov 2014 23:01:45 +0100 Subject: DOC: fix example in NpyIter docs that didn't compile --- doc/source/reference/c-api.iterator.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/source/reference/c-api.iterator.rst') 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; -- cgit v1.2.1