Skip to content

Commit 0e7daf4

Browse files
committed
Update docs in dtype.py: mention scaling of values
1 parent 9bccefb commit 0e7daf4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

skimage/util/dtype.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ def img_as_uint(image, force_copy=False):
304304
305305
Notes
306306
-----
307-
Negative input values will be clipped.
307+
Negative input values will be clipped.
308+
Positive values are scaled between 0 and 65535.
308309
309310
"""
310311
return convert(image, np.uint16, force_copy)
@@ -327,6 +328,7 @@ def img_as_int(image, force_copy=False):
327328
328329
Notes
329330
-----
331+
The values are scaled between -32768 and 32767.
330332
If the input data-type is positive-only (e.g., uint8), then
331333
the output image will still only have positive values.
332334
@@ -351,7 +353,8 @@ def img_as_ubyte(image, force_copy=False):
351353
352354
Notes
353355
-----
354-
Negative input values will be clipped.
356+
Negative input values will be clipped.
357+
Positive values are scaled between 0 and 255.
355358
356359
"""
357360
return convert(image, np.uint8, force_copy)

0 commit comments

Comments
 (0)