case umap_ ## UMAP: \
{ \
charNDArray in_m = matrix; \
Array<octave_idx_type> p (
dim_vector (matrix.ndims (), 1)); \
if (matrix.ndims () > 1) \
{ \
p(i) = i; \
p(0) = 1; \
p(1) = 0; \
in_m = matrix.permute (p); \
} \
size_t output_length = in_m.numel (); \
const uint8_t *in = reinterpret_cast<const uint8_t *> (in_m.data ()); \
uint8_t *buf = reinterpret_cast<uint8_t *> (ch_array.fortran_vec ()); \
U8_FCN (in, matrix.numel (), nullptr, buf, &output_length); \
if (output_length != static_cast<size_t> (matrix.numel ())) \
{ \
warning_with_id ("Octave:multi_byte_char_length", \
"UMAP: Possible multi-byte error."); \
return
octave_value (matrix.map<
char, int (&) (
int)> (STD_FCN)); \
} \
return
octave_value ((matrix.ndims () > 1) ? ch_array.permute (p,
true)\
: ch_array); \
}
Vector representing the dimensions (size) of an Array.