[DRE-commits] [ruby-numo-narray] 07/13: fix bug in methods: min/max_index

Youhei SASAKI uwabami-guest at moszumanska.debian.org
Wed Jun 21 08:37:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

uwabami-guest pushed a commit to branch patch-queue/master
in repository ruby-numo-narray.

commit c6e2058d08b6d6203e1218f9bdc173abcd2f32da
Author: Masahiro TANAKA <masa16.tanaka at gmail.com>
Date:   Sat Jun 3 17:13:22 2017 +0900

    fix bug in methods: min/max_index
    
    
    Gbp-Pq: Name 0007-fix-bug-in-methods-min-max_index.patch
---
 ext/numo/narray/numo/types/real_accum.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext/numo/narray/numo/types/real_accum.h b/ext/numo/narray/numo/types/real_accum.h
index b22f453..8435075 100644
--- a/ext/numo/narray/numo/types/real_accum.h
+++ b/ext/numo/narray/numo/types/real_accum.h
@@ -306,7 +306,7 @@ static inline size_t f_min_index(size_t n, char *p, ssize_t stride)
         y = *(dtype*)p;
         p += stride;
         if (not_nan(y)) {
-            j = i;
+            j = i; i++;
             for (; i<n; i++) {
                 x = *(dtype*)p;
                 p += stride;
@@ -350,7 +350,7 @@ static inline size_t f_max_index(size_t n, char *p, ssize_t stride)
         y = *(dtype*)p;
         p += stride;
         if (not_nan(y)) {
-            j = i;
+            j = i; i++;
             for (; i<n; i++) {
                 x = *(dtype*)p;
                 p += stride;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-numo-narray.git



More information about the Pkg-ruby-extras-commits mailing list