I have a .dat file containing a large (600000,6,8000) float array generated with numpy.memmap.
The third axis represents a date range. At runtime, the user specifies a narrower date range. The result is that I end up slicing along the 3rd dimension array[i, :, user_start:user_end]
millions of times during execution.
I know it's possible to offset the memmap by a fixed number, but is there a way to confine the dimensions of the array at the beginning of the run such that I don't need to slice the third axis each time?