From 9c8b1efd2630a5e63c95bca614e00c0cc929d646 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Wed, 23 Jul 2014 04:12:23 +0530 Subject: [PATCH] docstring to _ncut_cy.pys --- skimage/graph/_ncut_cy.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skimage/graph/_ncut_cy.pyx b/skimage/graph/_ncut_cy.pyx index 77cb18ea..d8156ba4 100644 --- a/skimage/graph/_ncut_cy.pyx +++ b/skimage/graph/_ncut_cy.pyx @@ -7,6 +7,18 @@ import numpy as np def argmin2(cnp.float64_t[:] array): + """Return the index of the 2nd smallest value in an array. + + Parameters + ---------- + a : array + The array to process. + + Returns + ------- + i : int + The index of the second smallest value. + """ cdef cnp.float64_t min1 = np.inf cdef cnp.float64_t min2 = np.inf cdef Py_ssize_t i1 = 0