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.default_rng(unittest_tools.fetch_seed())
      v1 = pytensor.shared(
          np.array(rng.uniform(size=(m_shp[1],)), dtype="float32")
      )
      v2_orig = np.array(rng.uniform(size=(m_shp[0],)), dtype="float32")
      v2 = pytensor.shared(v2_orig)
      m = pytensor.shared(
          np.array(rng.uniform(size=m_shp), dtype="float32")
      )
  
      f = pytensor.function([], v2 + pt.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 = pytensor.function(
          [], [], updates=[(v2, v2 + pt.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 warnings import warn
  import numpy
  import pytest
  import pytensor
  import pytensor.tensor
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.basic import AllocEmpty
  from pytensor.tensor.blas import Ger
  from pytensor.tensor.blas_c import CGemv, CGer, check_force_gemv_init
  from pytensor.tensor.blas_scipy import ScipyGer
  from pytensor.tensor.type import dmatrix, dvector, matrix, scalar, tensor, vector
  from tests import unittest_tools
  from tests.tensor.test_blas import BaseGemv, TestBlasStrides
  from tests.unittest_tools import OptimizationTestMixin
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