view_10d = blockwise_view_5d( a_5d, blockshape_5d )
// Drop the extra dimensions
slicing_5d = (0,)*padded_dims + (slice(None),)*a.ndim
slicing_10d = slicing_5d + slicing_5d
view = view_10d[slicing_10d]
After Change
intra_block_strides *= a.itemsize
inter_block_strides *= a.itemsize
strides = tuple(inter_block_strides) + tuple(intra_block_strides)
// This is where the magic happens.
// Generate a view with our new strides.
return numpy.lib.stride_tricks.as_strided(a, shape=view_shape, strides=strides)