pixel_clusterizer/clusterizer.py
def set_cluster_dtype(self, cluster_dtype):
        ''' Set the data type of the cluster.

        Parameters:
        -----------
        cluster_dtype : numpy.dtype or equivalent
            Defines the dtype of the cluster array.
        '''
        if not cluster_dtype:
            cluster_dtype = np.dtype([])
        else:
            cluster_dtype = np.dtype(cluster_dtype)
        cluster_descr = cluster_dtype.descr

        for dtype_name, dtype in self._default_cluster_descr:
            if self._cluster_fields_mapping[dtype_name] not in cluster_dtype.fields:
                cluster_descr.append((dtype_name, dtype))

        self._cluster_descr = cluster_descr
        self._init_arrays(size=0)
def set_cluster_dtype(self, cluster_dtype):
        ''' Set the data type of the cluster.

        Parameters:
        -----------
        cluster_dtype : numpy.dtype or equivalent
            Defines the dtype of the cluster array.
        '''
        if not cluster_dtype:
            cluster_dtype = np.dtype([])
        else:
            cluster_dtype = np.dtype(cluster_dtype)
        cluster_descr = cluster_dtype.descr

        for dtype_name, dtype in self._default_cluster_descr:
            if self._cluster_fields_mapping[dtype_name] not in cluster_dtype.fields:
                cluster_descr.append((dtype_name, dtype))

        self._cluster_descr = cluster_descr
        self._init_arrays(size=0)
Set the data type of the cluster.

        Parameters:
        -----------
        cluster_dtype : numpy.dtype or equivalent
            Defines the dtype of the cluster array.