Beispiel #1
0
    def sort_indices(self):
        """Sort the indices of this matrix *in place*
        """
        if self.has_sorted_indices:
            return

        R,C = self.blocksize
        M,N = self.shape

        bsr_sort_indices(M//R, N//C, R, C, self.indptr, self.indices, self.data.ravel())

        self.has_sorted_indices = True
Beispiel #2
0
    def sort_indices(self):
        """Sort the indices of this matrix *in place*
        """
        if self.has_sorted_indices:
            return

        R,C = self.blocksize
        M,N = self.shape

        bsr_sort_indices(M/R, N/C, R, C, self.indptr, self.indices, self.data.ravel())

        self.has_sorted_indices = True