From 2781d30bb736358fa6a2b1540bb67c0d6c8e405a Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Fri, 14 Mar 2014 21:09:31 +0530 Subject: [PATCH] doc strings --- skimage/feature/_hessian_det_appx.pyx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/skimage/feature/_hessian_det_appx.pyx b/skimage/feature/_hessian_det_appx.pyx index 92c4c08e..f5d0fc6e 100644 --- a/skimage/feature/_hessian_det_appx.pyx +++ b/skimage/feature/_hessian_det_appx.pyx @@ -6,6 +6,27 @@ from skimage import util cdef inline int _clip(np.int_t x, np.int_t low, np.int_t high): + """Clips coordinate between high and low. + + This method was created so that `hessian_det_appx` does not have to make + a Python call. + + Parameters + ---------- + x : int + Coordinate to be clipped. + low : int + The lower bound. + high : int + The higher bound. + + Returns + ------- + x : int + `x` clipped between 'high' and `low`. + + """ + if(x > high): return high if(x < low):