From c54d8d31f3a95a7734b30b2d5d9e58c1261b1a4b Mon Sep 17 00:00:00 2001 From: JDWarner Date: Mon, 24 Sep 2012 11:30:45 -0500 Subject: [PATCH] Docfix for img_as_float; appended myself to CONTRIBUTORS img_as_float() had a legacy note stating conversion would force negative values to the positive domain; this no longer described its functionality. Note changed to reflect the retention of negative values when converting from signed datatypes. When submitting my multichannel improvement to the random walker segmentation algorithm, I neglected to append my name to the CONTRIBUTORS file. Now fixed. --- CONTRIBUTORS.txt | 3 +++ skimage/util/dtype.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 5f375c39..0e3f1250 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -110,3 +110,6 @@ - Pavel Campr Fixes and tests for Histograms of Oriented Gradients. + +- Joshua Warner + Multichannel random walker segmentation. diff --git a/skimage/util/dtype.py b/skimage/util/dtype.py index d2a0dd61..9f804406 100644 --- a/skimage/util/dtype.py +++ b/skimage/util/dtype.py @@ -265,8 +265,8 @@ def img_as_float(image, force_copy=False): Notes ----- - The range of a floating point image is [0, 1]. - Negative input values will be shifted to the positive domain. + The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when + converting from unsigned or signed datatypes, respectively. """ return convert(image, np.float64, force_copy)