Bug introduced in 11.3 or earlier and persisting through 12.1 or later. Fixed in 13.0.0 or earlier

I didn't expect any difference between these:

dsa = {{{#@{3}}}, {{#@{2, 2}}}} &[Developer`ToPackedArray];
dsa[[All, 1, 1, -1]] = q;

{{{{q}}}, {{{q, 2}}}}

asd = {{{#@{3}}}, {{#@{2, 2}}}} &[Identity];
asd[[All, 1, 1, -1]] = q;

{{{{q}}}, {{{2, q}}}}

What makes the differences?

Update: I reported it for version 12.0 and got a response confirming it is a bug.

  • 7
    $\begingroup$ Must be a bug in the implementation of write access to nestes packed arrays. The analogous read operations dsa[[All, 1, 1, -1]] are performed correctly in both cases. I would suggest to report it to Wolfram Support. $\endgroup$ Aug 27, 2018 at 15:23
  • $\begingroup$ Where is this difference coming from? What's the way to avoid it? This makes me nervous about my recent work's validity. Can we possibly find a work-around? $\endgroup$ Apr 19, 2019 at 19:35

1 Answer 1


The bug appears to have been fixed in V13.0.0 or earlier



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.