class_docstr: Tests of CGemv specifically.
  
  Generic tests of Gemv-compatibility, including both dtypes are
  done below in TestCGemvFloat32 and TestCGemvFloat64
class_docstr_tok: ["Tests","of","CGemv","specifically",".","Generic","tests","of","Gemv-compatibility",",","including","both","dtypes","are","done","below","in","TestCGemvFloat32","and","TestCGemvFloat64"]
docstr: test vector2 + dot(matrix, vector1) 
docstr_tok: ["test","vector2","+","dot","(","matrix",",","vector1",")"]
code: def t_gemv1(self, m_shp):
      """test vector2 + dot(matrix, vector1)"""
      rng = np.random.RandomState(unittest_tools.fetch_seed())
      v1 = theano.shared(
          np.array(rng.uniform(size=(m_shp[1],)), dtype="float32")
      )
      v2_orig = np.array(rng.uniform(size=(m_shp[0],)), dtype="float32")
      v2 = theano.shared(v2_orig)
      m = theano.shared(
          np.array(rng.uniform(size=m_shp), dtype="float32")
      )
  
      f = theano.function([], v2 + tensor.dot(m, v1), mode=self.mode)
  
      # Assert they produce the same output
      assert np.allclose(
          f(), np.dot(m.get_value(), v1.get_value()) + v2_orig
      )
      topo = [n.op for n in f.maker.fgraph.toposort()]
      assert topo == [CGemv(inplace=False)], topo
  
      # test the inplace version
      g = theano.function(
          [], [], updates=[(v2, v2 + theano.dot(m, v1))], mode=self.mode
      )
  
      # Assert they produce the same output
      g()
      assert np.allclose(
          v2.get_value(),
          np.dot(m.get_value(), v1.get_value()) + v2_orig,
      )
      topo = [n.op for n in g.maker.fgraph.toposort()]
      assert topo == [CGemv(inplace=True)]
  
      # Do the same tests with a matrix with strides in both dimensions
      m.set_value(m.get_value(borrow=True)[::-1, ::-1], borrow=True)
      v2.set_value(v2_orig)
      assert np.allclose(
          f(), np.dot(m.get_value(), v1.get_value()) + v2_orig
      )
      g()
      assert np.allclose(
          v2.get_value(),
          np.dot(m.get_value(), v1.get_value()) + v2_orig,
      )
  
imports: from __future__ import absolute_import, print_function, division
  import sys
  import numpy
  from unittest import TestCase
  from nose.plugins.skip import SkipTest
  import theano
  import theano.tensor
  from theano.tensor.blas_c import CGer
  from theano.tensor.blas_scipy import ScipyGer
  from theano.tensor.blas import Ger
  from theano.tensor.blas_c import CGemv
  from theano.tensor.blas import Gemv
  from theano.tensor.blas_c import check_force_gemv_init
  from theano.tests import unittest_tools
  from theano.tests.unittest_tools import TestOptimizationMixin
  from theano.tensor.tests.test_blas import BaseGemv, TestBlasStrides
label_desc: Use image node_id 6 for calling the TestCGemv obj's underlying member method code with example usage: obj.t_gemv1(m_shp) without return types