MCPcopy Create free account
hub / github.com/PyTables/PyTables / populate_x_memmap

Function populate_x_memmap

bench/poly.py:60–69  ·  view source on GitHub ↗

Populate the values in x axis for numpy.memmap.

()

Source from the content-addressed store, hash-verified

58
59
60def 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
72def populate_x_tables(clib, clevel):

Callers 1

poly.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected