From ed4de6cb62f90c2a7ea3f3ac40f4d3f7f5abdfa3 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 20 Sep 2018 15:27:30 +0300 Subject: [PATCH] Fix docstring typo If we `import numpy as np`, use `np` not `numpy` --- src/PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 64bb39b34..9f2379337 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2446,7 +2446,7 @@ def fromarray(obj, mode=None): from PIL import Image import numpy as np im = Image.open('hopper.jpg') - a = numpy.asarray(im) + a = np.asarray(im) Then this can be used to convert it to a Pillow image::