StrideArraysCore.jl
StrideArraysCore.jl copied to clipboard
Support `reshape`
Currently, reshape(::StrideArray) gives a ReshapedArray. It'd be nice if we could do something similar to how view was handled.
It should probably only return another StrideArray if the original array was dense and column major.
My usecase is that I want to make a large statically sized vector, then take a small dynamic view of that vector then reshape it to a matrix.
You're welcome to make a PR!
But for that particular use case, you could also use ManualMemory.MemoryBuffer directly.
Another PR idea is to support that case directly, e.g. add support for providing a promise that the array is smaller than a given size, and then constructing a MemoryBuffer of the provided size.
Nice, sounds good