Skip to content

Commit

Permalink
Fix Mandelbrot code example and use Pillow instead of PIL in it.
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Dec 21, 2019
1 parent ad7cc40 commit f81ea98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ implementation`_ for the `Computer Language Benchmarks Game`_.
lua_code = '''\
function(N, i, total)
local char, unpack = string.char, unpack
local char, unpack = string.char, table.unpack
local result = ""
local M, ba, bb, buf = 2/N, 2^(N%8+1)-1, 2^(8-N%8), {}
local start_line, end_line = N/total * (i-1), N/total * i - 1
Expand Down Expand Up @@ -793,8 +793,8 @@ implementation`_ for the `Computer Language Benchmarks Game`_.
result_buffer = b''.join(results)
# use PIL to display the image
import Image
# use Pillow to display the image
from PIL import Image
image = Image.fromstring('1', (image_size, image_size), result_buffer)
image.show()
Expand Down

0 comments on commit f81ea98

Please sign in to comment.