Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1656ebc commit 7d94530Copy full SHA for 7d94530
1 file changed
examples/pylab_examples/agg_buffer_to_array.py
@@ -12,7 +12,7 @@
12
# grab the pixel buffer and dump it into a numpy array
13
buf = fig.canvas.buffer_rgba()
14
l, b, w, h = fig.bbox.bounds
15
-X = np.frombuffer(buf, np.uint8)
+X = np.fromstring(buf, np.uint8)
16
X.shape = h,w,4
17
18
# now display the array X as an Axes in a new figure
0 commit comments