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
const A = randn(100);
aa = AxisArray(A;x=SortedVector([i for i in 1:100]));
function axisarrays_alloc(array,xs)
@view array[xs];
nothing;
end
xs = 2:10;
@benchmark axisarrays_alloc(aa,xs)
This occurs if x is a SortedVector or plain Vector but not if it is a range. I believe this is related to #147 since the axes are being copied even in a view. I have not yet verified whether or not it is fixed by #148.
The text was updated successfully, but these errors were encountered:
bgroenks96
changed the title
Unexpected allocation on views of AxisArrays
Unexpected allocation on views of AxisArray
Jan 24, 2021
Consider the following simple example:
results in:
This occurs if
x
is aSortedVector
or plainVector
but not if it is a range. I believe this is related to #147 since the axes are being copied even in a view. I have not yet verified whether or not it is fixed by #148.The text was updated successfully, but these errors were encountered: