code: def calc_fractal_numpy(q, maxiter):
      # calculate z using numpy, this is the original
      # routine from vegaseat's URL
      output = np.resize(
          np.array(
              0,
          ),
          q.shape,
      )
      z = np.zeros(q.shape, np.complex64)
  
      for it in range(maxiter):
          z = z * z + q
          done = np.greater(abs(z), 2.0)
          q = np.where(done, 0 + 0j, q)
          z = np.where(done, 0 + 0j, z)
          output = np.where(done, it, output)
      return output
  
file_path: pyopencl/examples/demo_mandelbrot.py
imports: import time
  import numpy
  import pyopencl
  from PIL import Image
label_desc: Use image node_id 3 for calling a global function with example usage: calc_fractal_numpy(q, maxiter) and returns: output