From 4194bc0421d5b4bf05098302e32dcbc77f836a01 Mon Sep 17 00:00:00 2001 From: Jeffrey Gill Date: Tue, 9 Feb 2021 18:54:18 -0500 Subject: [PATCH] Address Numpy DeprecationWarning --- ephyviewer/tests/testing_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ephyviewer/tests/testing_tools.py b/ephyviewer/tests/testing_tools.py index ba62739..dcbf14d 100644 --- a/ephyviewer/tests/testing_tools.py +++ b/ephyviewer/tests/testing_tools.py @@ -80,7 +80,7 @@ def make_video_file(filename, codec='mpeg4', rate=25.): # mpeg4 mjpeg libx264 #~ ax.set_title() #~ line.set_markersize(i) fig.canvas.draw() - one_img = np.fromstring(fig.canvas.tostring_rgb(), dtype='u1').reshape(h,w,3) + one_img = np.frombuffer(fig.canvas.tostring_rgb(), dtype='u1').reshape(h,w,3) one_img = one_img[:,:,::-1].copy() #~ one_img = one_img .swapaxes(0,1).copy()