-
Notifications
You must be signed in to change notification settings - Fork 6
Description
As promised, I just tried the mandelbrot version from the solution branch, and unfortunately I run into the same (or very similar) problem with numba vectorize:
UFuncTypeError: ufunc 'mandelbrot_vec' did not contain a loop with signature matching types (<class 'numpy.dtype[complex128]'>, <class 'numpy.dtype[int64]'>) -> <class 'numpy.dtype[int64]'>
I'm on a recent macbook pro with M1 chip, and conda install gave me numba.__version__ == '0.53.1'.
Minor (unrelated) detail, in the 'Hint' section where the innermost loop is factored out as its own function, you're using the constant MAX_ITER rather than the function arg max_iter:
And the same is true in the solution:
As a further minor suggestion, it might be worthwhile to make a separate function def mandelbrot_render(niters) with the plotting logic so we can easily check if our changes don't mess up the results. In that case, though, it's important to always use niters = compute_mandelbrot(...) everywhere, and not just the naked compute_mandelbrot().
Anyway, thanks for a great workshop, hope this helps a bit.