MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / MB

Function MB

code/dask/MB_numba_dask.py:49–62  ·  view source on GitHub ↗
(Re, Im, imax, job_id, n_jobs)

Source from the content-addressed store, hash-verified

47@jit(uint8[:,:](float64[:],float64[:],int64,int64,int64),
48 nopython=True)
49def 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
64def main():
65 imax = 255

Callers

nothing calls this directly

Calls 1

nIterFunction · 0.70

Tested by

no test coverage detected