code: def test_errors(self):
      def func(x, y):
          return x + y, x - y
  
      x = tensor("x", shape=(5,))
      y = tensor("y", shape=())
  
      with pytest.raises(ValueError, match="Number of inputs"):
          vectorize(func, signature="(),()->()")(x)
  
      with pytest.raises(ValueError, match="Number of outputs"):
          vectorize(func, signature="(),()->()")(x, y)
  
      with pytest.raises(
          ValueError, match="Input y has less dimensions"
      ):
          vectorize(func, signature="(a),(a)->(a),(a)")(x, y)
  
      bad_input = RandomGeneratorType()
  
      with pytest.raises(TypeError, match="must be TensorVariable"):
          vectorize(func)(bad_input, x)
  
      def bad_func(x, y):
          x + y
  
      with pytest.raises(ValueError, match="no outputs"):
          vectorize(bad_func)(x, y)
  
file_path: pytensor/tests/tensor/test_functional.py
imports: import numpy
  import pytest
  from pytensor.graph.basic import equal_computations
  from pytensor.tensor import full, tensor
  from pytensor.tensor.functional import vectorize
  from pytensor.tensor.random.type import RandomGeneratorType
label_desc: Use image node_id 4 for calling the TestVectorize obj's underlying member method code with example usage: obj.test_errors() and returns: unknown,  unknown