import numpy as np


def localizator(centroid_map):
    """
    Localization module of the centroid detector.

    Parameters
    ----------
    centroid_map : numpy.ndarray
        representation of an image with centroids with the pixel
        value of 1, while the background is of value 0

    Returns
    -------
    centroids : numpy.ndarray
        numpy.ndarray of all centroids detected in an image,
        each element of the array is an array of three values (x, y, class)
    """

    return np.argwhere(centroid_map == 1)
