Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf4f332

Browse files
committed
Merge pull request #3763 from mdboom/fix-webagg
BUG : fix type being passed to png writer in webAgg
2 parents 28d3fcd + 56d6257 commit cf4f332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def get_diff_image(self):
143143
# TODO: We should write a new version of write_png that
144144
# handles the differencing inline
145145
_png.write_png(
146-
output,
146+
output.view(dtype=np.uint8).reshape(output.shape + (4,)),
147147
self._png_buffer)
148148

149149
# Swap the renderer frames

0 commit comments

Comments
 (0)