introduced optimized conversion routines. ones remaining are permute_dimensions_int() and transpose_replace_int()