code: def test_param_allow_downcast_int(self):
      a = tensor.wvector("a")  # int16
      b = tensor.bvector("b")  # int8
      c = tensor.bscalar("c")  # int8
      f = pfunc(
          [
              In(a, allow_downcast=True),
              In(b, allow_downcast=False),
              In(c, allow_downcast=None),
          ],
          (a + b + c),
      )
  
      # Both values are in range. Since they're not ndarrays (but lists),
      # they will be converted, and their value checked.
      assert np.all(f([3], [6], 1) == 10)
  
      # Values are in range, but a dtype too large has explicitly been given
      # For performance reasons, no check of the data is explicitly performed
      # (It might be OK to change this in the future.)
      self.assertRaises(
          TypeError, f, [3], np.array([6], dtype="int16"), 1
      )
  
      # Value too big for a, silently ignored
      assert np.all(f([2**20], np.ones(1, dtype="int8"), 1) == 2)
  
      # Value too big for b, raises TypeError
      self.assertRaises(TypeError, f, [3], [312], 1)
  
      # Value too big for c, raises TypeError
      self.assertRaises(TypeError, f, [3], [6], 806)
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  from theano.tensor import dmatrix, iscalar, lscalar, dmatrices
  from theano import tensor
  from theano.compile import In
  from theano.compile import pfunc
  from theano.compile import shared
  from theano.compile import config
label_desc: Use image node_id 9 for calling the Test_pfunc obj's underlying member method code with example usage: obj.test_param_allow_downcast_int() without return types