to_f2py_str_array

cosmic.utils.to_f2py_str_array(pylist, maxlen=256)[source]

Convert Python list of strings to NumPy array of fixed-length strings for F2PY.

Parameters:
pylistlist of str

Strings to convert.

maxlenint

Max length for Fortran strings.

Returns:
np.ndarray

Array of dtype S{maxlen}