mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 22:03:45 +08:00
Update docs for img_as_ubyte
The line in `img_as_ubyte` needs correction; ubyte cannot hold negative data. From a quick experiment it seems like both `img_as_uint` and `img_as_ubyte` clip negative values (and not shift them to the positive domain).
This commit is contained in:
@@ -304,7 +304,7 @@ def img_as_uint(image, force_copy=False):
|
||||
|
||||
Notes
|
||||
-----
|
||||
Negative input values will be shifted to the positive domain.
|
||||
Negative input values will be clipped.
|
||||
|
||||
"""
|
||||
return convert(image, np.uint16, force_copy)
|
||||
@@ -351,8 +351,7 @@ def img_as_ubyte(image, force_copy=False):
|
||||
|
||||
Notes
|
||||
-----
|
||||
If the input data-type is positive-only (e.g., uint16), then
|
||||
the output image will still only have positive values.
|
||||
Negative input values will be clipped.
|
||||
|
||||
"""
|
||||
return convert(image, np.uint8, force_copy)
|
||||
|
||||
Reference in New Issue
Block a user