Did I find the right examples for you? yes no

All Samples(32)  |  Call(18)  |  Derive(0)  |  Import(14)

src/s/c/scipy-0.13.3/scipy/sparse/compressed.py   scipy(Download)
from .dia import dia_matrix
from . import sparsetools
from .sputils import upcast, upcast_char, to_native, isdense, isshape, \
     getdtype, isscalarlike, isintlike, IndexMixin
 
 
        elif isinstance(arg1, tuple):
            if isshape(arg1):
                # It's a tuple of matrix dimensions (M, N)
                # create empty matrix

src/s/c/scipy-HEAD/scipy/sparse/compressed.py   scipy(Download)
from data import _data_matrix
import sparsetools
from sputils import upcast, upcast_char, to_native, isdense, isshape, \
     getdtype, isscalarlike, isintlike
 
 
        elif isinstance(arg1, tuple):
            if isshape(arg1):
                # It's a tuple of matrix dimensions (M, N)
                # create empty matrix

src/s/c/scipy-0.13.3/scipy/sparse/dok.py   scipy(Download)
 
from .base import spmatrix, isspmatrix
from .sputils import (isdense, getdtype, isshape, isintlike, isscalarlike,
                      upcast, upcast_scalar)
 
 
        self.dtype = getdtype(dtype, default=float)
        if isinstance(arg1, tuple) and isshape(arg1):  # (M,N)
            M, N = arg1
            self.shape = (M, N)
        Any non-zero elements that lie outside the new shape are removed.
        """
        if not isshape(shape):
            raise TypeError("dimensions must be a 2-tuple of positive"
                             " integers")

src/c/o/cobrapy-HEAD/cobra/oven/danielhyduke/jython/scipy/sparse/compressed.py   cobrapy(Download)
from data import _data_matrix
import sparsetools
from sputils import upcast, to_native, isdense, isshape, getdtype, \
        isscalarlike, isintlike
 
 
        elif isinstance(arg1, tuple):
            if isshape(arg1):
                # It's a tuple of matrix dimensions (M, N)
                # create empty matrix

src/s/c/scipy-0.13.3/scipy/sparse/bsr.py   scipy(Download)
from .compressed import _cs_matrix
from .base import isspmatrix, _formats
from .sputils import isshape, getdtype, to_native, upcast
from . import sparsetools
from .sparsetools import bsr_matvec, bsr_matvecs, csr_matmat_pass1, \
 
        elif isinstance(arg1,tuple):
            if isshape(arg1):
                # it's a tuple of matrix dimensions (M,N)
                self.shape = arg1
                    blocksize = (1,1)
                else:
                    if not isshape(blocksize):
                        raise ValueError('invalid blocksize=%s' % blocksize)
                    blocksize = tuple(blocksize)

src/s/c/scipy-0.13.3/scipy/sparse/lil.py   scipy(Download)
 
from .base import spmatrix, isspmatrix
from .sputils import getdtype, isshape, issequence, isscalarlike, ismatrix, \
    IndexMixin, upcast_scalar
 
            self.data = A.data
        elif isinstance(arg1,tuple):
            if isshape(arg1):
                if shape is not None:
                    raise ValueError('invalid use of shape parameter')

src/s/c/scipy-HEAD/scipy/sparse/bsr.py   scipy(Download)
from compressed import _cs_matrix
from base import isspmatrix, _formats
from sputils import isshape, getdtype, to_native, upcast
import sparsetools
from sparsetools import bsr_matvec, bsr_matvecs, csr_matmat_pass1, \
 
        elif isinstance(arg1,tuple):
            if isshape(arg1):
                #it's a tuple of matrix dimensions (M,N)
                self.shape  = arg1
                    blocksize = (1,1)
                else:
                    if not isshape(blocksize):
                        raise ValueError('invalid blocksize=%s' % blocksize)
                    blocksize = tuple(blocksize)

src/s/c/scipy-HEAD/scipy/sparse/dok.py   scipy(Download)
 
from base import spmatrix, isspmatrix
from sputils import isdense, getdtype, isshape, isintlike, isscalarlike, upcast
 
try:
 
        self.dtype = getdtype(dtype, default=float)
        if isinstance(arg1, tuple) and isshape(arg1): # (M,N)
            M, N = arg1
            self.shape = (M, N)
        Any non-zero elements that lie outside the new shape are removed.
        """
        if not isshape(shape):
            raise TypeError("dimensions must be a 2-tuple of positive"
                             " integers")

src/s/c/scipy-0.13.3/scipy/sparse/coo.py   scipy(Download)
from .base import isspmatrix
from .data import _data_matrix, _minmax_mixin
from .sputils import upcast, upcast_char, to_native, isshape, getdtype, isintlike
 
 
    def __init__(self, arg1, shape=None, dtype=None, copy=False):
        _data_matrix.__init__(self)
 
        if isinstance(arg1, tuple):
            if isshape(arg1):

src/c/o/cobrapy-HEAD/cobra/oven/danielhyduke/jython/scipy/sparse/lil.py   cobrapy(Download)
 
from base import spmatrix, isspmatrix
from sputils import getdtype, isshape, issequence, isscalarlike
 
class lil_matrix(spmatrix):
            self.data  = A.data
        elif isinstance(arg1,tuple):
            if isshape(arg1):
                if shape is not None:
                    raise ValueError('invalid use of shape parameter')

  1 | 2  Next