gemseo / utils

py23_compat module

Python2 and Python3 compatibility layer.

Functions:

getargspec(func)

Get arguments specifications.

string_array(data)

Creates a numpy array of strings from data the dtype is adjusted (bytes in py3, string in py2)

strings_to_unicode_list(iterable)

Convert a list of strings to a list of unicode strings.

gemseo.utils.py23_compat.getargspec(func)[source]

Get arguments specifications.

Parameters

func (Callable) –

Return type

Tuple[str]

gemseo.utils.py23_compat.string_array(data)[source]

Creates a numpy array of strings from data the dtype is adjusted (bytes in py3, string in py2)

Parameters

data (numpy.ndarray) –

Return type

numpy.ndarray

gemseo.utils.py23_compat.strings_to_unicode_list(iterable)[source]

Convert a list of strings to a list of unicode strings.

Parameters

iterable (Iterable[str]) –

Return type

Iterable[str]