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"]
code: def test_optimizations_mv(self):
      skip_if_blas_ldflags_empty()
      """ Test matrix dot vector """
      f = pytensor.function(
          [self.A, self.y], pt.dot(self.A, self.y), mode=self.mode
      )
  
      # Assert that the dot was optimized somehow
      self.assertFunctionContains0(f, pt.dot)
      self.assertFunctionContains1(f, CGemv(inplace=True))
  
      # Assert they produce the same output
      assert np.allclose(
          f(self.Aval, self.yval), np.dot(self.Aval, self.yval)
      )
      # Test with negative strides on 2 dims
      assert np.allclose(
          f(self.Aval[::-1, ::-1], self.yval),
          np.dot(self.Aval[::-1, ::-1], self.yval),
      )
  
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 4 for calling the TestCGemv obj's underlying member method code with example usage: obj.test_optimizations_mv() without return types