cobyqa.utils.exact_1d_array#

cobyqa.utils.exact_1d_array(x, message)[source]#

Preprocess a 1-dimensional array.

Parameters:
xarray_like

Array to be preprocessed.

messagestr

Error message if x cannot be interpreter as a 1-dimensional array.

Returns:
numpy.ndarray

Preprocessed array.