smac.utils.logging

Functions

format_array(inputs[, format_vals])

Transform a numpy array to a list of format so that it can be printed by logger.

Classes

PickableLoggerAdapter(name)

smac.utils.logging.format_array(inputs, format_vals=True)[source]

Transform a numpy array to a list of format so that it can be printed by logger. If the list holds one element only, then a formatted string is returned.

Parameters
  • inputs (np.ndarray or list.) – inputs value, could be anything serializable or a np array

  • format_vals (bool.) – if the items in list are formatted values

Returns

result

Return type

float or list of floats.