# Nonsparse SparseArray crashes the Kernel

Bug introduced in 10.0 and fixed in 11.1

On Windows 10, 64 bit, version 11.0.1, my kernel just started crashing for no reason as for as I can see. Does/should the following crash your kernel?

sparse = SparseArray[ArrayRules[RandomInteger[{1, 10}, 20] // N]];
Fold[Partition, sparse, {2, 5}]


It crashes only when the sparse array is all nonzero (nonsparse), and when the entries are not _Integer, and when the sparse array is created by rules. I use the workaround Fold[Partition, Normal@sparse, {2, 5}], but I don't think Normal should need be there.

• Crashes for me as well (same system configuration). Feb 2, 2017 at 19:31
• Crashed for me too (v11.0.1 on macOS Sierra). Good way to reset the In[]:= numbers, though ;-) Feb 2, 2017 at 21:09
• It's definitely not Fold: doing sp1 = Partition[sparse, 2]; Partition[sp1, 5] crashes the kernel for me (Mac OSX 10.5, M V10.0.1), but sp1 = Partition[sparse, 2] // Normal; Partition[sp1, 5] doesn't. So Partitioning the two-index SparseArray here is a problem. Feb 2, 2017 at 21:12
• But this works fine?! mat = N@RandomInteger[{1, 10}, {10, 2}]; Partition[SparseArray@mat, 5] Feb 2, 2017 at 21:16
• reported it. It's the second partition that does it. Feb 3, 2017 at 2:04

sparse =