Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/s/c/scipy-0.13.3/scipy/sparse/csr.py   scipy(Download)
    def tobsr(self, blocksize=None, copy=True):
        from .bsr import bsr_matrix
 
        if blocksize is None:
            from .spfuncs import estimate_blocksize
            return self.tobsr(blocksize=estimate_blocksize(self))
 
        elif blocksize == (1,1):
            arg1 = (self.data.reshape(-1,1,1),self.indices,self.indptr)
            return bsr_matrix(arg1, shape=self.shape, copy=copy)
                    indptr, indices, data.ravel())
 
            return bsr_matrix((data,indices,indptr), shape=self.shape)
 
    # these functions are used by the parent class (_cs_matrix)

src/s/c/scipy-HEAD/scipy/sparse/csr.py   scipy(Download)
    def tobsr(self, blocksize=None, copy=True):
        from bsr import bsr_matrix
 
        if blocksize is None:
            from spfuncs import estimate_blocksize
            return self.tobsr(blocksize=estimate_blocksize(self))
 
        elif blocksize == (1,1):
            arg1 = (self.data.reshape(-1,1,1),self.indices,self.indptr)
            return bsr_matrix(arg1, shape=self.shape, copy=copy )
                    indptr, indices, data.ravel() )
 
            return bsr_matrix((data,indices,indptr), shape=self.shape)
 
    # these functions are used by the parent class (_cs_matrix)

src/s/c/scipy-0.13.3/scipy/sparse/construct.py   scipy(Download)
from .csr import csr_matrix
from .csc import csc_matrix
from .bsr import bsr_matrix
from .coo import coo_matrix
from .lil import lil_matrix
        data = data * B
 
        return bsr_matrix((data,A.indices,A.indptr), shape=output_shape)
    else:
        # use COO

src/s/c/scipy-HEAD/scipy/sparse/construct.py   scipy(Download)
from csr import csr_matrix
from csc import csc_matrix
from bsr import bsr_matrix
from coo import coo_matrix
from lil import lil_matrix
        data = data * B
 
        return bsr_matrix((data,A.indices,A.indptr), shape=output_shape)
    else:
        #use COO