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