

def __init__(self, format, kmap=None):
    if (format not in ('csr', 'csc')):
        raise ValueError("format must be one of: 'csr', 'csc'", format)
    self.format = format
    if ((kmap is not None) and all((kmap == numpy.arange(numpy.size(kmap))))):
        kmap = None
    self.kmap = kmap
    if (not isinstance(self.kmap, numpy.ndarray)):
        self.view_map = {
            0: [0],
        }
    self._hashval = ((hash(type(self)) ^ hash(self.format)) ^ _kmap_hash(self.kmap))

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py CSM.__init__/original