8000 Merge pull request #26802 from MarcBresson/main · matplotlib/matplotlib@6fa5045 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6fa5045

Browse files
authored
Merge pull request #26802 from MarcBresson/main
specify input range in logs when image data must be clipped
2 parents 9b16729 + b31b17d commit 6fa5045

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,9 @@ def _normalize_image_array(A):
700700
if A.min() < 0 or high < A.max():
701701
_log.warning(
702702
'Clipping input data to the valid range for imshow with '
703-
'RGB data ([0..1] for floats or [0..255] for integers).'
703+
'RGB data ([0..1] for floats or [0..255] for integers). '
704+
'Got range [%s..%s].',
705+
A.min(), A.max()
704706
)
705707
A = np.clip(A, 0, high)
706708
# Cast unsupported integer types to uint8

0 commit comments

Comments
 (0)
0