diff options
author | Lars Buitinck <larsmans@gmail.com> | 2014-11-19 23:01:45 +0100 |
---|---|---|
committer | Lars Buitinck <larsmans@gmail.com> | 2014-11-19 23:02:34 +0100 |
commit | 7f45d4248d6a311aa8558525ca8c0dc1317540f6 (patch) | |
tree | 8176fd643c9d19d60ec05984e1388775592ab7a6 /doc | |
parent | ff8a1469fabbb91579a3da95fc6c1f750e6ee82a (diff) | |
download | numpy-7f45d4248d6a311aa8558525ca8c0dc1317540f6.tar.gz |
DOC: fix example in NpyIter docs that didn't compile
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/reference/c-api.iterator.rst | 3 |
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; |