You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error reshaping these lazy arrays, because their length means something else. Is there a reason not to fix this, perhaps like this?
using RecursiveArrayTools
A = VectorOfArray([rand(4) for i=1:3] )
size(A) == (4,3)
reshape(A, (2,6)) # error
function Base._reshape(parent::VectorOfArray, dims::Base.Dims)
n = prod(size(parent))
prod(dims) == n || _throw_dmrs(n, "size", dims)
Base.__reshape((parent, IndexStyle(parent)), dims)
end
reshape(A, (2,6)) # no error!
I get an error reshaping these lazy arrays, because their
lengthmeans something else. Is there a reason not to fix this, perhaps like this?