str2d.Str2D.struct_array_from_char_array

classmethod Str2D.struct_array_from_char_array(array: ndarray) Str2D[source]

Create a structured array from a character array. This is useful when you have a 2D array of characters and you want to convert it to a structured array with fields ‘char’ and ‘alpha’.

Parameters:

array (np.ndarray) – A 2D character array.

Returns:

A structured array with fields ‘char’ and ‘alpha’ created from the input character array.

Return type:

np.ndarray