Skip to content

Commit 1e07a73

Browse files
chaoyihutacaswell
authored andcommitted
change note
1 parent 211db94 commit 1e07a73

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*alpha* parameter handling in _ImageBase._make_image
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
This PR expands and clarifies code logic in _ImageBase._make_image
5+
related to the *alpha* parameter, and ensures that `~.Axes.imshow`
6+
exhibits the following behavior:
7+
8+
1. When the image does not have alpha channel:
9+
- *alpha* not specified: default to 1.0.
10+
- scalar *alpha*: broadcast.
11+
- array *alpha*: concatenate.
12+
2. When the image has an alpha channel:
13+
- *alpha* not specified: nothings needs to be done.
14+
- scalar *alpha*: multiply the alpha channel with user-specified scalar.
15+
- array *alpha*: replace the alpha channel with user-specified array.

0 commit comments

Comments
 (0)