one_hot#

bayesflow.utils.numpy_utils.one_hot(indices: ndarray, num_classes: int, dtype: str = 'float32') ndarray[source]#

Converts a 1D array of indices to a one-hot encoded 2D array.