[Numpy-discussion] Re: Find location of slice in it's base

2023-08-31 Thread Dom Grigonis
Thank you, sounds just what I need. Will work on this in due time. > On 1 Sep 2023, at 00:38, Robert Kern wrote: > > On Thu, Aug 31, 2023 at 3:25 PM Dom Grigonis > wrote: > Hi everyone, > > I am working with shared arrays and their slices. And trying to subclass

[Numpy-discussion] Re: Find location of slice in it's base

2023-08-31 Thread Robert Kern
On Thu, Aug 31, 2023 at 3:25 PM Dom Grigonis wrote: > Hi everyone, > > I am working with shared arrays and their slices. And trying to subclass > ndarray in such way so that they remap to memory on unpickling. I am using > package SharedArray, which doesn’t micro-manage memory locations, but > ra

[Numpy-discussion] Re: Find location of slice in it's base

2023-08-31 Thread Dom Grigonis
I am looking for something that would work for stride tricks too. Essentially, any possible view. > On 31 Aug 2023, at 23:03, Aaron Meurer wrote: > > In principle this can be reconstructed from the strides, shape, and > base memory address (a.ctypes.data) of the view and base arrays. > However,

[Numpy-discussion] Re: Find location of slice in it's base

2023-08-31 Thread Aaron Meurer
In principle this can be reconstructed from the strides, shape, and base memory address (a.ctypes.data) of the view and base arrays. However, not all views can be reconstructed using slices alone, for example, views from reshape operations or stride tricks. I don't know if it's possible to just con