<s> import numpy as np <EOL> def mandelbrot ( z , maxiter ) : <EOL> c = z <EOL> for n in range ( maxiter ) : <EOL> if abs ( z ) > <NUM_LIT:2> : <EOL> return n <EOL> z = z * z + c <EOL> return maxiter <EOL> def mandelbrot_set ( xmin , xmax , ymin , ymax , width , height , maxiter ) : <EOL> r1 = np . linspace ( xmin , xmax , width ) <EOL> r2 = np . linspace ( ymin , ymax , height ) <EOL> return [ mandelbrot ( complex ( r , i ) , maxiter ) for r in r1 for i in r2 ] <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> mandelbrot_set ( - <NUM_LIT> , <NUM_LIT:0.5> , - <NUM_LIT> , <NUM_LIT> , <NUM_LIT:1000> , <NUM_LIT:1000> , <NUM_LIT> ) </s>
