def matVecModM(A, s, m):
    assert A.dtype == 'int64'
    return numpy.int32(numpy.sum((A*s) % m, 1) % m)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sandbox/rng_mrg.py/matVecModM/original