Did I find the right examples for you? yes no

All Samples(43)  |  Call(22)  |  Derive(0)  |  Import(21)

src/s/c/scipy-0.13.3/scipy/sparse/base.py   scipy(Download)
        # Pre-multiply by a (1 x m) row vector 'a' containing all zeros
        # except for a_i = 1
        from .csr import csr_matrix
        m = self.shape[0]
        if i < 0:
            i += m
        if i < 0 or i >= m:
            raise IndexError("index out of bounds")
        row_selector = csr_matrix(([1], [[0], [i]]), shape=(1,m), dtype=self.dtype)

src/s/c/scipy-HEAD/scipy/sparse/base.py   scipy(Download)
        # Pre-multiply by a (1 x m) row vector 'a' containing all zeros
        # except for a_i = 1
        from csr import csr_matrix
        m = self.shape[0]
        if i < 0:
            i += m
        if i < 0 or i >= m:
            raise IndexError("index out of bounds")
        row_selector = csr_matrix(([1], [[0], [i]]), shape=(1,m), dtype=self.dtype)

src/s/c/scipy-0.13.3/scipy/sparse/csc.py   scipy(Download)
    def transpose(self, copy=False):
        from .csr import csr_matrix
        M,N = self.shape
        return csr_matrix((self.data,self.indices,self.indptr),(N,M),copy=copy)
 
                 indptr, indices, data)
 
        from .csr import csr_matrix
        A = csr_matrix((data, indices, indptr), shape=self.shape)
        A.has_sorted_indices = True

src/s/c/scipy-HEAD/scipy/sparse/csc.py   scipy(Download)
    def transpose(self, copy=False):
        from csr import csr_matrix
        M,N = self.shape
        return csr_matrix((self.data,self.indices,self.indptr),(N,M),copy=copy)
 
                 indptr, indices, data)
 
        from csr import csr_matrix
        A = csr_matrix((data, indices, indptr), shape=self.shape)
        A.has_sorted_indices = True

src/s/c/scipy-0.13.3/scipy/sparse/coo.py   scipy(Download)
 
        """
        from .csr import csr_matrix
        if self.nnz == 0:
            return csr_matrix(self.shape, dtype=self.dtype)
                      indptr, indices, data)
 
            A = csr_matrix((data, indices, indptr), shape=self.shape)
            A.sum_duplicates()
 

src/s/c/scipy-HEAD/scipy/sparse/coo.py   scipy(Download)
 
        """
        from csr import csr_matrix
        if self.nnz == 0:
            return csr_matrix(self.shape, dtype=self.dtype)
                      indptr, indices, data)
 
            A = csr_matrix((data, indices, indptr), shape=self.shape)
            A.sum_duplicates()
 

src/s/c/scipy-0.13.3/scipy/sparse/bsr.py   scipy(Download)
        self.data[:len(nonzero_blocks)] = self.data[nonzero_blocks]
 
        from .csr import csr_matrix
 
        # modifies self.indptr and self.indices *in place*
        proxy = csr_matrix((mask,self.indices,self.indptr),shape=(M//R,N//C))

src/s/c/scipy-HEAD/scipy/sparse/bsr.py   scipy(Download)
        self.data[:len(nonzero_blocks)] = self.data[nonzero_blocks]
 
        from csr import csr_matrix
 
        # modifies self.indptr and self.indices *in place*
        proxy = csr_matrix((mask,self.indices,self.indptr),shape=(M//R,N//C))

src/s/c/scipy-0.13.3/scipy/sparse/lil.py   scipy(Download)
                raise TypeError('unsupported matrix type')
            else:
                from .csr import csr_matrix
                A = csr_matrix(A, dtype=dtype).tolil()
 
        data = np.asarray(data, dtype=self.dtype)
 
        from .csr import csr_matrix
        return csr_matrix((data, indices, indptr), shape=self.shape)
 

src/s/c/scipy-HEAD/scipy/sparse/lil.py   scipy(Download)
                raise TypeError('unsupported matrix type')
            else:
                from csr import csr_matrix
                A = csr_matrix(A, dtype=dtype).tolil()
 
        data = np.asarray(data, dtype=self.dtype)
 
        from csr import csr_matrix
        return csr_matrix((data, indices, indptr), shape=self.shape)
 

  1 | 2  Next