def __calculate_centers(self):
dimension = self.__data.shape[<NUM_LIT:1>]<EOL>centers = numpy.zeros((len(self.__centers), dimension))<EOL>for i in range(len(self.__centers)):<EOL><INDENT>centers[i] = numpy.divide(self.__membership[:, i] @ self.__data, numpy.sum(self.__membership[:, i]))<EOL><DEDENT>return centers<EOL>
!
        @brief Calculate center using membership of each cluster.

        @return (list) Updated clusters as list of clusters. Each cluster contains indexes of objects from data.

        @return (numpy.array) Updated centers.