I've been working on creating a few lazy arrays for our applications.
For large data volumes, it is often critical to avoid the use of bounce buffers.
Essentially, I'm looking to see if there exists a function like `np.take` that would take:
1. A slice for the input array. 2. A slice for the output array. 3. Assign the slice of the input array to the output array.
I could "slice" and assign,
s = MyFancyArray((3, 1024, 1024, 1024)) # A very big array a = np.zeros(s.shape, dtype=s.dtype) a[...] = s # I want this operation to be crafted carefully
But that seems to: 1. Instantiate the full array `s` with `__array__`. 2. slice into s without passing me a reference to the array `a`.
Is there something like `np.take` or `np.copyto` that is more general?