4 ms·
Aside to the multidimensional slices thing: if you want a dense "multidimensional slice", it's probably going to be a lot more efficient (if more verbose) to al
by JulianMorrison 6y ago
Aside to the multidimensional slices thing: if you want a dense "multidimensional slice", it's probably going to be a lot more efficient (if more verbose) to allocate an underlying array by multiplying the dimensions and then make your easy to use slice-of-slices point into that array.
Note that this implies you need to avoid any operations that might resize the slices.