mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 18:44:19 +08:00
DOC: add a note on warning treatment
This commit is contained in:
@@ -73,6 +73,14 @@ issued::
|
||||
float64 to uint8
|
||||
array([ 0, 128, 255], dtype=uint8)
|
||||
|
||||
Warnings can be locally ignored with a context manager::
|
||||
|
||||
>>> import warnings
|
||||
>>> image = np.array([0, 0.5, 1], dtype=float)
|
||||
>>> with warnings.catch_warnings():
|
||||
... warnings.simplefilter("ignore")
|
||||
... img_as_ubyte(image)
|
||||
array([ 0, 128, 255], dtype=uint8)
|
||||
|
||||
Additionally, some functions take a ``preserve_range`` argument where a range
|
||||
conversion is convenient but not necessary. For example, interpolation in
|
||||
|
||||
Reference in New Issue
Block a user