Populate the values in x axis for numpy.memmap.
()
| 58 | |
| 59 | |
| 60 | def populate_x_memmap(): |
| 61 | """Populate the values in x axis for numpy.memmap.""" |
| 62 | # Create container for input |
| 63 | x = np.memmap(mpfnames[0], dtype=dtype, mode="w+", shape=(N,)) |
| 64 | |
| 65 | # Populate x in range [-1, 1] |
| 66 | for i in range(0, N, step): |
| 67 | chunk = np.linspace((2 * i - N) / N, (2 * (i + step) - N) / N, step) |
| 68 | x[i : i + step] = chunk |
| 69 | del x # close x memmap |
| 70 | |
| 71 | |
| 72 | def populate_x_tables(clib, clevel): |