From 9379bc01d81b8521e1778ec0295d819d26f66c38 Mon Sep 17 00:00:00 2001 From: neozhaoliang Date: Sat, 20 Jan 2024 00:28:55 +0800 Subject: [PATCH] fix numba error --- src/misc/julia.py | 2 +- src/misc/mandelbrot.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/julia.py b/src/misc/julia.py index 7b78bd8..3490444 100644 --- a/src/misc/julia.py +++ b/src/misc/julia.py @@ -12,7 +12,7 @@ CONST = 0.7 -@jit("float32(complex64)") +@jit("float32(complex64)", nopython=True) def escape(z): for i in range(MAXITERS): if z.real * z.real + z.imag * z.imag > RADIUS: diff --git a/src/misc/mandelbrot.py b/src/misc/mandelbrot.py index e7d963f..cec609f 100755 --- a/src/misc/mandelbrot.py +++ b/src/misc/mandelbrot.py @@ -16,7 +16,7 @@ RADIUS = 100 -@jit +@jit(nopython=True) def color(z, i): v = np.log2(i + 1 - np.log2(np.log2(abs(z)))) / 5 if v < 1.0: @@ -26,7 +26,7 @@ def color(z, i): return v, v ** 1.5, v ** 3 -@jit +@jit(nopython=True) def iterate(c): z = 0j for i in range(MAXITERS):