| 48 | @jit(nb_tuple((int64[:],uint8[:,:]))(int64,float64[:],int64,float64[:], |
| 49 | int64,int64,int64), nopython=True) |
| 50 | def MB(nC, Re_limits, nR, Im_limits, imax, job_id, n_jobs): |
| 51 | Re = np.linspace(Re_limits[0], Re_limits[1], nC) |
| 52 | Im = np.linspace(Im_limits[0], Im_limits[1], nR) |
| 53 | my_rows = np.arange(job_id, len(Im), n_jobs, dtype=np.int64) |
| 54 | n_rows_here = len(my_rows) |
| 55 | img = np.zeros((n_rows_here, nC), dtype=np.uint8) |
| 56 | row_counter = 0 |
| 57 | for i in my_rows: |
| 58 | I = Im[i] |
| 59 | for j,R in enumerate(Re): |
| 60 | c = complex(R, I) |
| 61 | img[row_counter, j] = nIter(c, imax) |
| 62 | row_counter += 1 |
| 63 | return my_rows, img |
| 64 | |
| 65 | def main(): |
| 66 | imax = 255 |