Why does Julia promote full arrays to sparse arrays? If I try to subtract a sparse array from a full array, why does the full array become a sparse array? This doesn’t make any sense to me. It makes much more sense in my head to keep it as a full array and efficiently do the subtraction as opposed to promoting the full array?
An example is below. The normal array arr is converted to a sparse array during the subtraction.
Arr isn’t mutated, it is simply reassigned. Your question is just that why does the substraction return a sparse array. Someone else will be more familiar with that heuristic…